|
|
|
@ -3,6 +3,7 @@
|
|
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
|
# |
|
|
|
|
# Filename: package/.../runit/djb-config |
|
|
|
|
# Copyright (C) 2008 The OpenSDE Project |
|
|
|
|
# Copyright (C) 2004 - 2006 The T2 SDE Project |
|
|
|
|
# Copyright (C) 1998 - 2003 Clifford Wolf |
|
|
|
|
# |
|
|
|
@ -54,6 +55,7 @@ pkg_djb_main() {
|
|
|
|
|
hook_eval postmake |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
# FIXME: join pkg_djb_safecopy and pkg_djb_safelink |
|
|
|
|
pkg_djb_safecopy() { |
|
|
|
|
local source="$( echo "${1#$root}/$3" | tr -s '/' ) " |
|
|
|
|
local target="$( echo "${2#$root}/$3" | tr -s '/' ) " |
|
|
|
@ -82,20 +84,24 @@ pkg_djb_installpackage() {
|
|
|
|
|
# requires ./package/commands |
|
|
|
|
# and files in ./command |
|
|
|
|
|
|
|
|
|
local x= y= |
|
|
|
|
local x= y= cmddir= |
|
|
|
|
local package=$1 |
|
|
|
|
local altdir=$2 |
|
|
|
|
|
|
|
|
|
# FIXME: rework to loop over ./package/commands just once |
|
|
|
|
if [ "$pkg_djb_packagedir" ]; then |
|
|
|
|
cmddir="$pkg_djb_packagedir/$package/$pkg-$ver/command" |
|
|
|
|
|
|
|
|
|
echo 'Copying commands to package directory...' |
|
|
|
|
mkdir -p $pkg_djb_packagedir/$package/$pkg-$ver/command |
|
|
|
|
mkdir -p "$cmddir" |
|
|
|
|
for x in `cat ./package/commands`; do |
|
|
|
|
pkg_djb_safecopy ./command \ |
|
|
|
|
$pkg_djb_packagedir/$package/$pkg-$ver/command $x |
|
|
|
|
pkg_djb_safecopy ./command "$cmddir" $x |
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
echo "Creating symlink $pkg -> $pkg-$ver..." |
|
|
|
|
ln -svnf $pkg-$ver $pkg_djb_packagedir/$package/$pkg |
|
|
|
|
else |
|
|
|
|
cmddir="./command" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
if [ "$pkg_djb_commanddir" ]; then |
|
|
|
@ -103,13 +109,13 @@ pkg_djb_installpackage() {
|
|
|
|
|
y=pkg_djb_safelink |
|
|
|
|
else |
|
|
|
|
echo 'Copying commands to $altdir...' |
|
|
|
|
pkg_djb_commanddir=$altdir |
|
|
|
|
pkg_djb_commanddir=$root/$altdir |
|
|
|
|
y=pkg_djb_safecopy |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
mkdir -p $pkg_djb_commanddir |
|
|
|
|
for x in `cat package/commands`; do |
|
|
|
|
$y $pkg_djb_packagedir/$package/$pkg-$ver/command \ |
|
|
|
|
$pkg_djb_commanddir $x |
|
|
|
|
$y $cmddir $pkg_djb_commanddir $x |
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
# usr/local is evil :) |
|
|
|
|