[SCM] libdvd-pkg/master: post{inst,rm} to use variables
onlyjob at users.alioth.debian.org
onlyjob at users.alioth.debian.org
Tue Jun 25 21:28:54 UTC 2013
The following commit has been merged in the master branch:
commit c128b183123548f017f41c402539466c6c7d6979
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date: Wed Jun 26 07:05:53 2013 +1000
post{inst,rm} to use variables
diff --git a/debian/postinst b/debian/postinst
index 224aa15..7748705 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -6,18 +6,21 @@ set -e
. /usr/share/debconf/confmodule
db_version 2.0
+PKG=libdvd-pkg
+P88=88libdvdcss-pkg
+
case "$1" in
configure*)
- db_get libdvd-pkg/build
+ db_get ${PKG}/build
if [ "$RET" = "true" ]; then
- db_get libdvd-pkg/post-invoke_hook
+ db_get ${PKG}/post-invoke_hook
if [ "$RET" = "true" ]; then
- [ -h "/etc/apt/apt.conf.d/88fheroes2-pkg" ] \
- || ln -s /usr/lib/fheroes2-pkg/88fheroes2-pkg /etc/apt/apt.conf.d/88fheroes2-pkg
+ [ -h "/etc/apt/apt.conf.d/${P88}" ] \
+ || ln -s /usr/lib/${PKG}/${P88} /etc/apt/apt.conf.d/${P88}
else
- rm -f /etc/apt/apt.conf.d/88fheroes2-pkg || true
+ rm -f /etc/apt/apt.conf.d/${P88} || true
fi
- /usr/lib/libdvd-pkg/b-i_libdvdcss.sh
+ /usr/lib/${PKG}/b-i_libdvdcss.sh
fi
;;
esac
diff --git a/debian/postrm b/debian/postrm
index 9311cdc..e4f9a35 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -2,14 +2,17 @@
set -e
+PKG=libdvd-pkg
+P88=88libdvdcss-pkg
+
case "$1" in
purge|abort-install)
- rm -rf /usr/src/libdvd-pkg || true
- rm -f /etc/apt/apt.conf.d/88libdvdcss-pkg || true
+ rm -rf /usr/src/${PKG} || true
+ rm -f /etc/apt/apt.conf.d/${P88} || true
;;
remove)
- rm -rf /usr/src/libdvd-pkg/build || true
- rm -f /etc/apt/apt.conf.d/88libdvdcss-pkg || true
+ rm -rf /usr/src/${PKG}/build || true
+ rm -f /etc/apt/apt.conf.d/${P88} || true
;;
esac
--
libdvdcss-pkg packaging
More information about the pkg-multimedia-commits
mailing list