You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.6 KiB
63 lines
1.6 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../execwrap/execwrap.conf |
|
# Copyright (C) 2006 The OpenSDE Project |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This program is free software; you can redistribute it and/or modify |
|
# it under the terms of the GNU General Public License as published by |
|
# the Free Software Foundation; version 2 of the License. A copy of the |
|
# GNU General Public License can be found in the file COPYING. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
if [ $prefix_auto -eq 1 ]; then |
|
# if lighttpd is installed, we take it's prefix |
|
if pkginstalled lighttpd; then |
|
pkgprefix -t lighttpd |
|
prefix=$( pkgprefix lighttpd ) |
|
set_confopt |
|
fi |
|
fi |
|
|
|
# the tarball doesn't include a folder, so fake one |
|
custextract=execwrap_extract |
|
execwrap_extract() { |
|
mkdir -p 'execwrap' |
|
taropt="-C execwrap $taropt" |
|
autoextract_tar_bz2 "$@" |
|
} |
|
|
|
PARENT_UID=80 |
|
TARGET_MIN_UID=500 |
|
TARGET_MIN_GID=100 |
|
TARGET_PATH_PREFIX=$bindir |
|
|
|
# no configure |
|
hook_add premake 5 'execwrap_config' |
|
execwrap_config() { |
|
sed -i -e "s,@@PARENT_UID@@,$PARENT_UID," \ |
|
-e "s,@@TARGET_MIN_UID@@,$TARGET_MIN_UID," \ |
|
-e "s,@@TARGET_MIN_GID@@,$TARGET_MIN_GID," \ |
|
-e "s,@@TARGET_PATH_PREFIX@@,$TARGET_PATH_PREFIX," \ |
|
execwrap_config.h |
|
|
|
cat execwrap_config.h |
|
} |
|
|
|
# no Makefile |
|
makeopt= |
|
hook_add inmake 5 '$CC -o execwrap execwrap.c && $STRIP execwrap' |
|
|
|
makeinstopt= |
|
hook_add postmake 5 'execwrap_install' |
|
execwrap_install() { |
|
# binary |
|
chown 0:80 execwrap |
|
chmod og-w,+rx,u+s execwrap |
|
cp -vaf execwrap $root$bindir/ |
|
# README |
|
cp -vf README $root$docdir/ |
|
} |
|
|
|
|