+clearsign-snapshot:
+ gpg --no-armor --detach-sign "$(SNAPSHOT).tar.gz"
+
+build-third-party:
+ git archive --prefix "$(SNAPSHOT)/$(THIRD_PARTY)" HEAD:$(THIRD_PARTY) \
+ | gzip > "$(SNAPSHOT)-third-party-source.tar.gz"
+ rm -rf "$(SNAPSHOT)/$(THIRD_PARTY)"
+
+clearsign-third-party:
+ gpg --no-armor --detach-sign "$(SNAPSHOT)-third-party-source.tar.gz"
+
+snapshot-shasums:
+ sha1sum $(SNAPSHOT)*.tar.gz*
+
+vessel-import: build-snapshot
+ [ -d $(VESSEL) ] || (echo "VESSEL isn't a path to your shipwright vessel" && exit -1)
+ cp $(VESSEL)/scripts/RT/build.pl /tmp/build.pl
+ ./sbin/rt-test-dependencies --with-standalone --with-fastcgi --with-sqlite --list > /tmp/rt.yml
+ shipwright import file:$(SNAPSHOT).tar.gz \
+ --require-yml /tmp/rt.yml \
+ --build-script /tmp/build.pl \
+ --name RT \
+ --repository fs:$(VESSEL) \
+ --log-level=info \
+ --skip cpan-capitalization,cpan-mod_perl,cpan-Encode,cpan-PPI,cpan-Test-Exception-LessClever,cpan-Test-Manifest,cpan-Test-Object,cpan-Test-Pod,cpan-Test-Requires,cpan-Test-SubCalls,cpan-Test-cpan-Tester,cpan-Test-Warn --skip-all-recommends
+ mv $(VESSEL)/scripts/RT/build $(VESSEL)/scripts/RT/build.pl
+
+JSMIN_URL = http://download.bestpractical.com/mirror/jsmin-2011-01-22.c
+JSMIN_SHA = 8a6b3b980a52c028eb73aee4a82ebe060c1ee854
+
+jsmin: jsmin-checkcc jsmin-fetch jsmin-verify jsmin-confirm jsmin-build jsmin-install
+ @echo ""
+ @echo "To configure RT to use jsmin, add the following line to $(DESTDIR)$(RT_ETC_PATH)/RT_SiteConfig.pm:"
+ @echo ""
+ @echo " Set(\$$JSMinPath, '$(DESTDIR)$(RT_BIN_PATH)/jsmin');"
+ @echo ""
+
+jsmin-checkcc:
+ @[ -n "$(CC)" ] || (echo "You don't appear to have a C compiler, please set CC and re-run configure" && exit 1)
+
+jsmin-confirm:
+ @echo "jsmin is distributed under a slightly unusual license and can't be shipped"
+ @echo "with RT. Before configuring RT to use jsmin, please read jsmin's license"
+ @echo "below:"
+ @echo ""
+ @$(PERL) -pe 'print && exit if /^\*\// or /^#include/' jsmin.c
+ @echo ""
+ @echo "Press Enter to accept the license, or Ctrl-C to stop now."
+ @$(PERL) -e '<STDIN>'
+
+jsmin-fetch:
+ @echo ""
+ @echo "Downloading jsmin.c from $(JSMIN_URL)"
+ @echo ""
+ @$(PERL) -MLWP::Simple -e 'exit not is_success(getstore("$(JSMIN_URL)", "jsmin.c"))' \
+ || (echo "Failed to download $(JSMIN_URL)" && exit 1)
+
+jsmin-verify:
+ @$(PERL) -MDigest::SHA -e \
+ 'exit not Digest::SHA->new(1)->addfile("jsmin.c")->hexdigest eq "$(JSMIN_SHA)"' \
+ || (echo "Verification of jsmin.c failed! Possible man in the middle?" && exit 1)
+
+jsmin-build:
+ $(CC) -o jsmin jsmin.c
+
+jsmin-install:
+ $(INSTALL) -o $(BIN_OWNER) -g $(RTGROUP) -m 0755 "jsmin" "$(DESTDIR)$(RT_BIN_PATH)/"