From 259900136c10b09ae6ee3476bc0467dd89a0171a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 10 Oct 2008 19:14:25 +0200 Subject: [PATCH] Added shared-mime-info-0.51 template and its related helper. --HG-- extra : convert_revision : 16763dc3fcd2361fef5ba0560c57a46b45333677 --- dependencies/build-depends.db | Bin 18432 -> 18432 bytes helper-templates/update-mimedb.sh | 13 ++++++++ .../shared-mime-info-runstuff-before-build.sh | 5 +++ templates/shared-mime-info.tmpl | 31 ++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100755 helper-templates/update-mimedb.sh create mode 100755 templates/shared-mime-info-runstuff-before-build.sh create mode 100755 templates/shared-mime-info.tmpl diff --git a/dependencies/build-depends.db b/dependencies/build-depends.db index 0ce23f991e8e8111a75b7f8532e88c0c7ba9ed83..55300f415f7499b68bbcfeb9b232c0472ac77800 100644 GIT binary patch delta 245 zcmZpez}PT>kvGYZm4TUofq{XEfq`Ko?{8sY9wHWF}SQ<{0T3>6z;pDrDxB z`H5@K+gFFTD4?{uGW_HJ)Yyg-#Jplj! delta 136 zcmZpez}PT>kvGYZm4TUofq{XEfq`cu?{8soJ_v_Ffgy+C55pP835+=mF^m@`D*8^| zpvN-#f=J5bC6XGG7l@`zz94BZ*+8^llNbxrWEK~J%_2^37&l3=Ffnp%W|iSqkuYK4 nVEn=;!T5yn3gZ#REsRSTIT&X!_ApM?a=0|nfNwL0;}13f?ye+6 diff --git a/helper-templates/update-mimedb.sh b/helper-templates/update-mimedb.sh new file mode 100755 index 00000000000..cebc0dda903 --- /dev/null +++ b/helper-templates/update-mimedb.sh @@ -0,0 +1,13 @@ +# +# This helper updates shared-mime-info's database when a template +# requests this operation. +# +updatemimedb_cmd="$PKGFS_MASTERDIR/bin/update-mime-database" +updatemimedb_dir="$PKGFS_MASTERDIR/share/mime" + +if [ -d "$PKGFS_MASTERDIR/share/mime" ]; then + $updatemimedb_cmd $updatemimedb_dir >/dev/null && \ + echo "=> Updated shared-mime-info database." +fi + +unset updatemimedb_cmd updatemimedb_dir diff --git a/templates/shared-mime-info-runstuff-before-build.sh b/templates/shared-mime-info-runstuff-before-build.sh new file mode 100755 index 00000000000..b35f632294d --- /dev/null +++ b/templates/shared-mime-info-runstuff-before-build.sh @@ -0,0 +1,5 @@ +# Replace hardcoded paths in XDG_DATA_DIRS. + +$sed_cmd -e "s|/usr/local/share|$PKGFS_MASTERDIR/share|g" \ + $wrksrc/update-mime-database.c > $wrksrc/update-mime-database.c.in && \ +$mv_cmd -f $wrksrc/update-mime-database.c.in $wrksrc/update-mime-database.c diff --git a/templates/shared-mime-info.tmpl b/templates/shared-mime-info.tmpl new file mode 100755 index 00000000000..e494fb7e74c --- /dev/null +++ b/templates/shared-mime-info.tmpl @@ -0,0 +1,31 @@ +# Template build file for 'shared-mime-info'. +pkgname=shared-mime-info +version=0.51 +extract_sufx=".tar.bz2" +url=http://people.freedesktop.org/~hadess +build_style=gnu_configure +configure_args="--disable-update-mimedb" +make_cmd="$PKGFS_MASTERDIR/bin/gmake" +pkgconfig_override="shared-mime-info.pc" +short_desc="Core database of common types" +maintainer="Juan RP " +checksum=9e0281f3bd9ac44af60833ec6b15af9f58936cc7 +long_desc=" + Many programs and desktops use the MIME system to represent the types of + files. Frequently, it is necessary to work out the correct MIME type for + a file. This is generally done by examining the file's name or contents, + and looking up the correct MIME type in a database. + + For interoperability, it is useful for different programs to use the same + database so that different programs agree on the type of a file, and new + rules for determining the type apply to all programs. + + This package contains the core database of common types and the + update-mime-database command used to extend it." + +# Fix hardcoded mime-info database PATH. +run_stuff_before="build" +run_stuff_before_build_file="$PKGFS_TEMPLATESDIR/$pkgname-runstuff-before-build.sh" + +# Update shared-mime-info database file. +postinstall_helpers="update-mimedb.sh"