Files
blackbox/Makefile

76 lines
2.4 KiB
Makefile
Raw Normal View History

2014-08-26 16:26:25 -04:00
SHELL=/bin/sh
PKGNAME=stack_blackbox
2014-08-26 16:26:25 -04:00
all:
@echo 'Menu:'
@echo ' make packages Make RPM packages'
2015-01-27 10:39:30 +00:00
@echo ' make install (incomplete)'
2014-08-26 16:26:25 -04:00
install:
@echo 'To install, copy the files from bin to somewhere in your PATH.'
@echo 'Or, if you use RPMs, "make packages" and install the result.'
# The default package type is RPM.
packages: packages-rpm
2015-02-03 12:18:01 -05:00
#
# MacPorts builds
#
2015-02-03 12:34:15 -05:00
# To test:
# rm -rf /tmp/foo ; mkdir -p /tmp/foo;make packages-macports DESTDIR=/tmp/foo;find /tmp/foo -ls
2015-02-03 12:18:01 -05:00
# Make mk_macports.vcs_blackbox.txt from mk_rpm_fpmdir.stack_blackbox.txt:
tools/mk_macports.vcs_blackbox.txt: tools/mk_rpm_fpmdir.stack_blackbox.txt
2015-02-03 12:34:15 -05:00
sed -e 's@/usr/blackbox/bin/@bin/@g' -e '/profile.d-usrblackbox.sh/d' <tools/mk_rpm_fpmdir.stack_blackbox.txt >$@
check-destdir:
ifndef DESTDIR
$(error DESTDIR is undefined)
endif
2015-02-03 12:18:01 -05:00
# MacPorts expects to run: make packages-macports DESTDIR=${destroot}
2015-02-03 12:34:15 -05:00
packages-macports: tools/mk_macports.vcs_blackbox.txt check-destdir
2015-02-03 12:18:01 -05:00
mkdir -p $(DESTDIR)/bin
2015-02-03 12:34:15 -05:00
cd tools && ./mk_macports mk_macports.vcs_blackbox.txt
2015-02-03 12:18:01 -05:00
#
# RPM builds
#
packages-rpm:
2015-01-29 16:43:26 -05:00
cd tools && PKGRELEASE="$${PKGRELEASE}" PKGDESCRIPTION="Safely store secrets in git/hg/svn repos using GPG encryption" ./mk_rpm_fpmdir stack_blackbox mk_rpm_fpmdir.stack_blackbox.txt
packages-rpm-debug:
@echo BUILD:
@PKGRELEASE=99 make packages
@echo ITEMS TO BE PACKAGED:
find ~/rpmbuild-$(PKGNAME)/installroot -type f
@echo ITEMS ACTUALLY IN PACKAGE:
@rpm -qpl $$(cat ~/rpmbuild-$(PKGNAME)/bin-packages.txt)
local-rpm:
@PKGRELEASE=1 make packages
-@sudo rpm -e $(PKGNAME)
sudo rpm -i $$(cat ~/rpmbuild-$(PKGNAME)/bin-packages.txt)
lock-rpm:
sudo yum versionlock add $(PKGNAME)
unlock-rpm:
sudo yum versionlock clear
# Add other package types here.
#
# System Test:
#
confidence:
@if [[ -e ~/.gnupg ]]; then echo ERROR: '~/.gnupg should not exist. If it does, bugs may polute your .gnupg configuration. If the code has no bugs everything will be fine. Do you feel lucky?'; false ; fi
@if which >/dev/null gpg-agent ; then pkill gpg-agent ; rm -rf /tmp/tmp.* ; fi
@export PATH=~/gitwork/blackbox/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin ;
2014-10-14 15:10:05 +00:00
cd ~/gitwork/blackbox && tools/confidence_test.sh
@if which >/dev/null gpg-agent ; then pkill gpg-agent ; fi
@if [[ -e ~/.gnupg ]]; then echo ERROR: '~/.gnupg was created which means the scripts might be poluting GnuPG configuration. Fix this bug.'; false ; fi