First attempt at a MacPorts config
This commit is contained in:
38
tools/mk_macports
Executable file
38
tools/mk_macports
Executable file
@@ -0,0 +1,38 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
# Install files into MacPorts DESTDIR
|
||||
|
||||
# Usage:
|
||||
# mk_macports MANIFEST MANIFEST1 ...
|
||||
|
||||
# Where "manifest.txt" contains:
|
||||
# exec /usr/bin/stack_makefqdn misc/stack_makefqdn.py
|
||||
# exec /usr/bin/bar bar/bar.sh
|
||||
# read /usr/man/man1/bar.1 bar/bar.1.man
|
||||
# 0444 /etc/foo.conf bar/foo.conf
|
||||
# (NOTE: "exec" means 0755; "read" means 0744)
|
||||
|
||||
set -e
|
||||
|
||||
# Parameters for this RPM:
|
||||
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]}"
|
||||
case $PERM in
|
||||
\#*) continue ;; # Skip comments.
|
||||
exec) PERM=0755 ;;
|
||||
read) PERM=0744 ;;
|
||||
*) ;;
|
||||
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
|
||||
14
tools/mk_macports.vcs_blackbox.txt
Normal file
14
tools/mk_macports.vcs_blackbox.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
exec bin/blackbox_cat ../bin/blackbox_cat
|
||||
exec bin/blackbox_edit ../bin/blackbox_edit
|
||||
exec bin/blackbox_edit_end ../bin/blackbox_edit_end
|
||||
exec bin/blackbox_edit_start ../bin/blackbox_edit_start
|
||||
exec bin/blackbox_initialize ../bin/blackbox_initialize
|
||||
exec bin/blackbox_postdeploy ../bin/blackbox_postdeploy
|
||||
exec bin/blackbox_register_new_file ../bin/blackbox_register_new_file
|
||||
exec bin/blackbox_removeadmin ../bin/blackbox_removeadmin
|
||||
exec bin/blackbox_shred_all_files ../bin/blackbox_shred_all_files
|
||||
exec bin/blackbox_update_all_files ../bin/blackbox_update_all_files
|
||||
Reference in New Issue
Block a user