Improve build templates by not having to set ${triggers} in some cases.

There's no need to update triggers in the following cases:
 * Packages installing stuff into /usr/share/applications.
 * Packages setting $gtk_iconcache_dirs.
 * Packages setting $font_dirs.
 * Packages setting ${sgml,xml}_entries.

--HG--
extra : convert_revision : 11c74b41f8cf474e9bf4dbb961b1aa9c6f6540bf
This commit is contained in:
Juan RP 2009-12-02 01:55:51 +01:00
parent 7761387770
commit c077559a89
54 changed files with 36 additions and 76 deletions

View File

@ -12,7 +12,6 @@ long_desc="
it unique among X terminal emulators."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
Add_dependency build pkg-config
Add_dependency build intltool

View File

@ -16,7 +16,6 @@ long_desc="
good start up time and directory load time."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
subpackages="$pkgname-devel"
Add_dependency build pkg-config

View File

@ -15,7 +15,6 @@ long_desc="
noarch=yes
font_dirs="/usr/share/fonts/TTF"
triggers="x11-fonts"
Add_dependency full font-util

View File

@ -27,7 +27,6 @@ long_desc="
noarch=yes
noextract=yes
triggers="xml-catalog"
Add_dependency full xmlcatmgr
Add_dependency build unzip

View File

@ -18,7 +18,6 @@ long_desc="
stylesheet."
noarch=yes
triggers="xml-catalog"
Add_dependency full xmlcatmgr
Add_dependency full docbook-xml ">=4.2"

View File

@ -12,7 +12,6 @@ long_desc="
conf_files="/etc/xdg/xfce4/helpers.rc"
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
subpackages="$pkgname-devel"
Add_dependency build pkg-config

View File

@ -20,7 +20,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/100dpi"
triggers="x11-fonts"
post_install()
{

View File

@ -20,7 +20,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/75dpi"
triggers="x11-fonts"
post_install()
{

View File

@ -16,7 +16,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/100dpi"
triggers="x11-fonts"
post_install()
{

View File

@ -16,7 +16,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/75dpi"
triggers="x11-fonts"
post_install()
{

View File

@ -16,7 +16,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/Type1"
triggers="x11-fonts"
post_install()
{

View File

@ -18,7 +18,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/100dpi"
triggers="x11-fonts"
post_install()
{

View File

@ -18,7 +18,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/75dpi"
triggers="x11-fonts"
post_install()
{

View File

@ -17,7 +17,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/100dpi"
triggers="x11-fonts"
post_install()
{

View File

@ -17,7 +17,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/75dpi"
triggers="x11-fonts"
post_install()
{

View File

@ -18,7 +18,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/TTF"
triggers="x11-fonts"
post_install()
{

View File

@ -18,7 +18,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/Type1"
triggers="x11-fonts"
post_install()
{

View File

@ -18,7 +18,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/100dpi"
triggers="x11-fonts"
post_install()
{

View File

@ -18,7 +18,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/75dpi"
triggers="x11-fonts"
post_install()
{

View File

@ -16,7 +16,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/lib/X11/fonts/Speedo"
triggers="x11-fonts"
post_install()
{

View File

@ -16,7 +16,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/Type1"
triggers="x11-fonts"
post_install()
{

View File

@ -16,7 +16,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/misc"
triggers="x11-fonts"
post_install()
{

View File

@ -15,7 +15,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/misc"
triggers="x11-fonts"
post_install()
{

View File

@ -17,7 +17,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/misc"
triggers="x11-fonts"
post_install()
{

View File

@ -15,7 +15,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/Type1"
triggers="x11-fonts"
post_install()
{

View File

@ -14,7 +14,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/misc"
triggers="x11-fonts"
post_install()
{

View File

@ -14,7 +14,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/misc"
triggers="x11-fonts"
post_install()
{

View File

@ -14,7 +14,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/misc"
triggers="x11-fonts"
post_install()
{

View File

@ -14,7 +14,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/share/fonts/X11/misc"
triggers="x11-fonts"
post_install()
{

View File

@ -14,7 +14,6 @@ Add_dependency full font-util
noarch=yes
font_dirs="/usr/lib/X11/fonts/misc"
triggers="x11-fonts"
post_install()
{

View File

@ -17,7 +17,7 @@ long_desc="
support and more than 8 bits per channel."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache mimedb"
triggers="mimedb"
conf_files="/etc/gimp/2.0/unitrc
/etc/gimp/2.0/gtkrc
/etc/gimp/2.0/menurc

View File

@ -12,7 +12,6 @@ long_desc="
noarch=yes
gtk_iconcache_dirs="/usr/share/icons/gnome"
triggers="gtk-icon-cache"
Add_dependency build pkg-config
Add_dependency build intltool

View File

@ -12,7 +12,6 @@ long_desc="
This packages includes the Ghostscript standard Type1 fonts."
font_dirs="/usr/share/fonts/Type1"
triggers="x11-fonts"
noarch=yes
Add_dependency full font-util

View File

@ -11,4 +11,3 @@ long_desc="
noarch=yes
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"

View File

@ -18,6 +18,10 @@ long_desc="
with support for keyboard accelerators and automatic signal
connection."
# Register DTDs with xmlcatmgr.
xml_entries="system http://glade.gnome.org/glade-2.0.dtd
/usr/share/xml/libglade/glade-2.0.dtd"
subpackages="$pkgname-devel"
Add_dependency build pkg-config
Add_dependency build python
@ -25,7 +29,3 @@ Add_dependency full glibc
Add_dependency full xmlcatmgr
Add_dependency full gtk+
# Register DTDs with xmlcatmgr.
triggers="xml-catalog"
xml_entries="system http://glade.gnome.org/glade-2.0.dtd
/usr/share/xml/libglade/glade-2.0.dtd"

View File

@ -11,7 +11,6 @@ long_desc="
conf_files="/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml"
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
subpackages="$pkgname-devel"
Add_dependency build pkg-config

View File

@ -23,7 +23,6 @@ long_desc="
conf_files="/etc/xdg/midori/search"
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
Add_dependency build pkg-config
Add_dependency build intltool

View File

@ -12,7 +12,6 @@ long_desc="
would have been difficult for Leafpad for various reasons."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
Add_dependency build pkg-config
Add_dependency build intltool

View File

@ -11,7 +11,6 @@ long_desc="
A simple calendar application with reminders for Xfce."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
Add_dependency build pkg-config
Add_dependency build intltool

View File

@ -11,7 +11,6 @@ long_desc="
environment."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
Add_dependency full dbus-glib
Add_dependency full libxfcegui4

View File

@ -14,7 +14,6 @@ long_desc="
noarch=yes
gtk_iconcache_dirs="/usr/share/icons/Tango"
triggers="gtk-icon-cache"
Add_dependency build pkg-config
Add_dependency build intltool

View File

@ -15,6 +15,5 @@ long_desc="
photo collection."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
Add_dependency full Thunar

View File

@ -14,7 +14,6 @@ long_desc="
back-end."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="update-desktopdb gtk-icon-cache"
Add_dependency build intltool
Add_dependency build curl

View File

@ -31,7 +31,6 @@ conf_files="
/etc/wicd/encryption/templates/active"
gtk_iconcache_dirs="/usr/share/icons/hicolor"
openrc_services="wicd default"
triggers="gtk-icon-cache"
Add_dependency full dbus-python
Add_dependency full pygtk

View File

@ -10,7 +10,6 @@ long_desc="
This package includes utilities for the Xfce Desktop Environment."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
Add_dependency build pkg-config
Add_dependency build intltool

View File

@ -10,7 +10,6 @@ long_desc="
xfce-appfinder shows system wide installed applications."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
Add_dependency build pkg-config
Add_dependency build intltool

View File

@ -10,7 +10,6 @@ long_desc="
This package includes a sound mixer for the XFce Desktop Environment."
gtk_iconcache_dirs="/usr/share/xfce4-mixer/icons/hicolor"
triggers="gtk-icon-cache"
Add_dependency build pkg-config
Add_dependency build intltool

View File

@ -11,7 +11,6 @@ long_desc="
that implements the Freedesktop.org Desktop Notifications Specification."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
Add_dependency full libxfcegui4
Add_dependency full libsexy

View File

@ -18,7 +18,6 @@ conf_files="/etc/xdg/xfce4/panel/launcher-7.rc
/etc/xdg/xfce4/panel/launcher-10.rc
/etc/xdg/xfce4/panel/clock-14.rc"
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
subpackages="$pkgname-devel"
Add_dependency build pkg-config

View File

@ -12,7 +12,6 @@ long_desc="
conf_files="/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml"
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
subpackages="$pkgname-devel"
Add_dependency build pkg-config

View File

@ -10,7 +10,6 @@ long_desc="
This package includes a desktop manager for the XFce Desktop Environment."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
Add_dependency build pkg-config
Add_dependency build intltool

View File

@ -12,7 +12,6 @@ long_desc="
KDE3 and Xfce."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
triggers="gtk-icon-cache"
Add_dependency build pkg-config
Add_dependency build intltool

View File

@ -346,16 +346,6 @@ _EOF
chmod 644 ${DESTDIR}/files.plist ${DESTDIR}/props.plist
[ -f $metadir/flist ] && chmod 644 $metadir/flist
#
# Update desktop-file-utils database if package contains
# any desktop file in /usr/share/applications.
#
if [ -d ${DESTDIR}/usr/share/applications ]; then
if find . -type f -name \*.desktop 2>&1 >/dev/null; then
triggers="$triggers update-desktopdb"
fi
fi
#
# Create the INSTALL/REMOVE scripts if package uses them
# or uses any available trigger.

View File

@ -23,12 +23,22 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#-
_add_trigger()
{
local f found name="$1"
for f in ${triggers}; do
[ "$f" = "$name" ] && found=1
done
[ -z "$found" ] && triggers="$triggers $name"
}
xbps_write_metadata_scripts_pkg()
{
local action="$1"
local tmpf=$(mktemp -t xbps-install.XXXXXXXXXX) || exit 1
local fpattern="s|${DESTDIR}||g;s|^\./$||g;/^$/d"
local targets found info_files
local targets f info_files
case "$action" in
install) ;;
@ -81,11 +91,7 @@ _EOF
fi
done
if [ -n "${info_files}" ]; then
for f in ${triggers}; do
[ "$f" = "info-files" ] && found=1
done
[ -z "$found" ] && triggers="$triggers info-files"
unset found
_add_trigger info-files
echo "export info_files=\"${info_files}\"" >> $tmpf
echo >> $tmpf
fi
@ -103,11 +109,7 @@ _EOF
# (Un)Register a shell in /etc/shells.
#
if [ -n "${register_shell}" ]; then
for f in ${triggers}; do
[ "$f" = "register-shell" ] && found=1
done
[ -z "$found" ] && triggers="$triggers register-shell"
unset found
_add_trigger register-shell
echo "export register_shell=\"${register_shell}\"" >> $tmpf
echo >> $tmpf
fi
@ -133,11 +135,15 @@ _EOF
echo "export xml_entries=\"${xml_entries}\"" >> $tmpf
echo >> $tmpf
fi
if [ -n "${sgml_entries}" -o -n "${xml_entries}" ]; then
_add_trigger xml-catalog
fi
#
# Handle X11 font updates via mkfontdir/mkfontscale.
#
if [ -n "${font_dirs}" ]; then
_add_trigger x11-fonts
echo "export font_dirs=\"${font_dirs}\"" >> $tmpf
echo >> $tmpf
fi
@ -146,11 +152,25 @@ _EOF
# Handle GTK+ Icon cache directories.
#
if [ -n "${gtk_iconcache_dirs}" ]; then
_add_trigger gtk-icon-cache
echo "export gtk_iconcache_dirs=\"${gtk_iconcache_dirs}\"" \
>> $tmpf
echo >> $tmpf
fi
#
# Handle .desktop files in /usr/share/applications with
# desktop-file-utils.
#
if [ -d ${DESTDIR}/usr/share/applications ]; then
if find . -type f -name \*.desktop 2>&1 >/dev/null; then
_add_trigger update-desktopdb
fi
fi
#
# Write the INSTALL/REMOVE package scripts.
#
if [ -n "$triggers" ]; then
found=1
echo "case \"\${ACTION}\" in" >> $tmpf