aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/www/mozplugger/Manifest4
-rw-r--r--net/www/mozplugger/mozplugger.SlackBuild56
2 files changed, 58 insertions, 2 deletions
diff --git a/net/www/mozplugger/Manifest b/net/www/mozplugger/Manifest
index c089f375..8b2cf58e 100644
--- a/net/www/mozplugger/Manifest
+++ b/net/www/mozplugger/Manifest
@@ -1,3 +1,3 @@
DIST mozplugger-1.12.0.tar.gz 95073 MD5 6d4dd7b1c577f625c9d664532389d6db RMD160 87c82713de2dd9b139ea0b49f856b6797c913fb8 SHA1 5107338378795c147e79c04eead8f9fa7f6ebd28 SHA256 1312aad8078dcda7f8ec8e9d756786034420406bf1658066d60392bdaa7befee SHA512 54b3308b806ae11e0021549bb8873d7f57efc9979858f3e746368a19c9d553dc9b8bcd92c7c60f57c3897d06abcb7afce4173218a0e57982814c370941c929ee
-MKBUILD mozplugger.mkbuild 3281 MD5 baa2e76c72691d088216135641f323f0 RMD160 aaf99cd2e28f3f60aae31ae59fcd1a7aace775c4 SHA1 8ee734858fc197425f7cbdf965ea6c607b94f6a6 SHA256 77a7d3f90006bafee92ed753bf55d5952f40d64be0ced4148e665ab7a1944513 SHA512 34e1d3f9c085e16d1bbcaea19bac90fa91e8940e8e71d552bc4bc25c93951f1b91c7d081da2b85e164687271e7a0065fd035c3863bcac3eca5aabae1f18506ee
-SLACKBUILD mozplugger.SlackBuild 6491 MD5 b67f98922df9c859f0ad1a4bc3a86b30 RMD160 aa58e1908b3a5ce0f7b5b22c276fb284e9bb05b0 SHA1 0ede0baf652a29005d11d5f9e3457f5157a67b75 SHA256 e4236b34d4fa63c6676de81ff43e541ac9c5a666537c9801016083d7d7952263 SHA512 fa89e5ee365157c66f03fc5eb2d77ed33595a760c36114d2db7ead28499a1958f2d8bd9288d3fb314597b5a3514e7fcc7e87bad0f8439d075b5ae9eafc14d170
+MKBUILD mozplugger.mkbuild 3377 MD5 e139faf76389960219f9f6989deca8c1 RMD160 c16c6a213acd84f241755cb99d913e2073816bba SHA1 b55e27e3e8f56de190346ff8df87f522c703d478 SHA256 d11f49b369798a736e52053f717f8618bbebdacbf1809a650ab0e1d7f313ec2f SHA512 a65843e8130d69f2a4f8f4274a9e1b0247daf2a2798745f9b5992dae957033c576334e793ec8963b0feb06f4cd779c48009ebf9dd1e0011da8c9a1a72dbf4e86
+SLACKBUILD mozplugger.SlackBuild 7827 MD5 b6efe5f1e084cfd6032b285fdbcb4754 RMD160 b635bdfcc1d0f3acb962839e90b37aefeae57e5b SHA1 3d9f57e8308e80973a7f6580496abce540a7ee82 SHA256 b83f550281114a88d8489b1b7cde34e8996eb6a10440a0402088c1660ef62f17 SHA512 4d519ebcc0d043dab403cacb9a859b62052f3c873327b71dddcd03e6f3f9b8bf19715eb6c370b45805bd7a1fec2ef1d11c88e0668b094e223816ff97a26c4e1e
diff --git a/net/www/mozplugger/mozplugger.SlackBuild b/net/www/mozplugger/mozplugger.SlackBuild
index 20a67204..9313b957 100644
--- a/net/www/mozplugger/mozplugger.SlackBuild
+++ b/net/www/mozplugger/mozplugger.SlackBuild
@@ -162,6 +162,19 @@ make install root=$PKG || exit $ERROR_INSTALL
xargs strip --strip-unneeded 2> /dev/null
)
+# Copy config files
+mkdir -p $PKG/etc
+for conf in mozpluggerrc; do
+ mkdir -p $PKG/etc/`dirname $conf`
+ if [ -e "$CWD/conf/$conf" ]; then
+ cp -a $CWD/conf/$conf $PKG/etc/$conf
+ elif [ -e "$CWD/$conf" ]; then
+ cp -a $CWD/$conf $PKG/etc/$conf
+ elif [ -e "$conf" ]; then
+ cp -a $conf $PKG/etc/$conf
+ fi
+done
+
# Install documentation
DOCS="COPYING ChangeLog README"
mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
@@ -195,6 +208,49 @@ mozplugger:
mozplugger:
EODESC
+# Add a post-installation script (doinst.sh)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EOSCRIPT > "$PKG/install/doinst.sh"
+config() {
+ NEW="\$1"
+ OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
+ OLD="\$(dirname \$NEW)/\$(basename \$OLD .sample)"
+ OLD="\$(dirname \$NEW)/\$(basename \$OLD .dist)"
+
+ # If there's no config file by that name, mv it over:
+ if [ ! -r \$OLD ]; then
+ mv \$NEW \$OLD
+ elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm \$NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+mkgroup() {
+ GROUP="\$1"
+ if ! grep -qe "^\$GROUP:" etc/group; then
+ echo Creating group \$GROUP...
+ chroot . /usr/sbin/groupadd \$GROUP
+ fi
+}
+
+mkuser() {
+ USER="\$1"
+ if [ ! -z "\$2" ]; then
+ GROUP="\$2"
+ else
+ GROUP="\$USER"
+ fi
+ if ! grep -qe "^\$USER:" etc/passwd; then
+ echo Creating user \$USER...
+ chroot . /usr/sbin/useradd \$USER -g \$GROUP
+ fi
+}
+
+config etc/mozpluggerrc
+EOSCRIPT
+
# Build the package
cd "$PKG"
makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG