wok-next view shared-mime-info/receipt @ rev 21379
updated mspdebug (0.17 -> 0.25)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Apr 16 16:31:49 2020 +0100 (2020-04-16) |
parents | ede906abe532 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="shared-mime-info"
4 VERSION="1.10"
5 CATEGORY="system-tools"
6 SHORT_DESC="Core database of common types"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://freedesktop.org/wiki/Software/shared-mime-info/"
10 LFS="http://www.linuxfromscratch.org/blfs/view/svn/general/shared-mime-info.html"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="https://people.freedesktop.org/~hadess/$TARBALL"
15 BUILD_DEPENDS="intltool libxml2-dev glib-dev"
16 SPLIT="$PACKAGE-dev"
18 compile_rules() {
19 # Original size before rebuilding/stripping
20 size0=$(ls -l freedesktop.org.xml | awk '{print $5}')
22 # Force to rebuild
23 rm freedesktop.org.xml
25 export LINGUAS="ar ca ca@valencia cs da de el en_GB es fa fi fr hr hu id \
26 it ja nb nl nn pl pt pt_BR ro ru sl sv tr uk vi zh_CN zh_TW"
28 ./configure \
29 --disable-update-mimedb \
30 $CONFIGURE_ARGS &&
31 make -j1 &&
32 make -j1 install || return 1
34 # Additional MIME-types supported by SliTaz
35 cp $stuff/*.xml $install/usr/share/mime/packages
37 # Strip
38 xml="$install/usr/share/mime/packages/freedesktop.org.xml"
39 title "Strip $xml"
40 echo "Original size: $size0 B"
41 echo "Only SliTaz locales: $(ls -l $xml | awk '{print $5}') B"
43 sed -i 's|^ *||' "$xml"
44 echo "Strip whitespace: $(ls -l $xml | awk '{print $5}') B"
46 echo -n "Remove non-translated: "
48 awk '{
49 if (index($0, "<comment>")) {
50 comment=$0;
51 gsub("<comment>", "", comment);
52 gsub("</comment>", "", comment);
53 print $0;
54 } else if (index($0, "<comment ")) {
55 comment2=$0;
56 gsub("<comment [^>]+>", "", comment2);
57 gsub("</comment>", "", comment2);
58 if (comment != comment2)
59 print $0;
60 } else
61 print $0
62 }' $xml > $xml.1
63 mv $xml.1 $xml
64 echo "$(ls -l $xml | awk '{print $5}') B"
65 }
67 genpkg_rules() {
68 case $PACKAGE in
69 shared-mime-info)
70 copy @std
71 DEPENDS="glib libxml2"
72 ;;
73 *-dev)
74 copy @dev
75 ;;
76 esac
77 }