Added xbps-triggers-0.1 build template.
This package contains the triggers used by the XBPS binary packages.
This commit is contained in:
parent
f05bcbea2e
commit
932e4eb464
2 changed files with 45 additions and 0 deletions
25
srcpkgs/xbps-triggers/INSTALL
Normal file
25
srcpkgs/xbps-triggers/INSTALL
Normal file
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
case "${ACTION}" in
|
||||
pre)
|
||||
#
|
||||
# xbps-base-files 0.37 does not have the XBPS triggers anymore.
|
||||
# If installed package is less than 0.37 remove them before
|
||||
# upgrading the package.
|
||||
#
|
||||
if command -v xbps-uhelper.static 2>&1 >/dev/null; then
|
||||
uhelper="$(command -v xbps-uhelper.static)"
|
||||
elif command -v xbps-uhelper 2>&1 >/dev/null; then
|
||||
uhelper="$(command -v xbps-uhelper)"
|
||||
fi
|
||||
[ -z "$uhelper" ] && break
|
||||
|
||||
set +e
|
||||
${uhelper} cmpver $(${uhelper} version xbps-base-files) 0.37
|
||||
if [ $? -eq 255 ]; then
|
||||
echo -n "Removing XBPS trigger files, now owned by the "
|
||||
echo "xbps-triggers package..."
|
||||
rm -vf var/db/xbps/triggers/*
|
||||
fi
|
||||
set -e
|
||||
;;
|
||||
esac
|
20
srcpkgs/xbps-triggers/template
Normal file
20
srcpkgs/xbps-triggers/template
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Template file for 'xbps-triggers'
|
||||
pkgname=xbps-triggers
|
||||
version=0.1
|
||||
build_style=custom-install
|
||||
short_desc="XBPS Package System triggers"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
long_desc="
|
||||
This package installs the triggers used by the XBPS binary packages."
|
||||
|
||||
noarch=yes
|
||||
base_chroot=yes
|
||||
|
||||
do_install()
|
||||
{
|
||||
install -d ${DESTDIR}/var/db/xbps/triggers
|
||||
install -m750 ${XBPS_TRIGGERSDIR}/* ${DESTDIR}/var/db/xbps/triggers
|
||||
for f in $(find ${DESTDIR}/var/db/xbps/triggers); do
|
||||
echo "# end" > ${f}
|
||||
done
|
||||
}
|
Loading…
Reference in a new issue