Clean up MacPorts configuration
This commit is contained in:
14
Makefile
14
Makefile
@@ -17,16 +17,22 @@ packages: packages-rpm
|
||||
#
|
||||
# MacPorts builds
|
||||
#
|
||||
# To test:
|
||||
# rm -rf /tmp/foo ; mkdir -p /tmp/foo;make packages-macports DESTDIR=/tmp/foo;find /tmp/foo -ls
|
||||
|
||||
# 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
|
||||
sed -e 's@/usr/blackbox/bin/@bin/@g' -e 's@/etc/profile.d@etc/profile.d@g' <tools/mk_rpm_fpmdir.stack_blackbox.txt >$@
|
||||
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
|
||||
|
||||
# MacPorts expects to run: make packages-macports DESTDIR=${destroot}
|
||||
packages-macports: tools/mk_macports.vcs_blackbox.txt
|
||||
mkdir -p $(DESTDIR)/etc/profile.d
|
||||
packages-macports: tools/mk_macports.vcs_blackbox.txt check-destdir
|
||||
mkdir -p $(DESTDIR)/bin
|
||||
cd tools && ./mk_macports vcs_blackbox mk_macports.vcs_blackbox.txt
|
||||
cd tools && ./mk_macports mk_macports.vcs_blackbox.txt
|
||||
|
||||
#
|
||||
# RPM builds
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/env bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Install files into MacPorts DESTDIR
|
||||
|
||||
@@ -14,11 +14,9 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Parameters for this RPM:
|
||||
# Fail if DESTDIR is not set.
|
||||
DESTDIR="${DESTDIR?"Envvar DESTDIR must be set to destination dir."}"
|
||||
|
||||
# -- Now the real work can be done.
|
||||
|
||||
# Copy the files into place:
|
||||
cat """$@""" | while read -a arr ; do
|
||||
PERM="${arr[0]}"
|
||||
@@ -30,9 +28,5 @@ cat """$@""" | while read -a arr ; do
|
||||
esac
|
||||
DST="$DESTDIR/${arr[1]}"
|
||||
SRC="${arr[2]}"
|
||||
if [[ $SRC == "cmd/"* || $SRC == *"/cmd/"* ]]; then
|
||||
( cd $(dirname "$SRC" ) && go build -a -v )
|
||||
fi
|
||||
echo install -m "$PERM" "$SRC" "$DST"
|
||||
install -m "$PERM" "$SRC" "$DST"
|
||||
done
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
read etc/profile.d/usrblackbox.sh profile.d-usrblackbox.sh
|
||||
exec bin/_blackbox_common.sh ../bin/_blackbox_common.sh
|
||||
exec bin/_stack_lib.sh ../bin/_stack_lib.sh
|
||||
exec bin/blackbox_addadmin ../bin/blackbox_addadmin
|
||||
|
||||
Reference in New Issue
Block a user