wok-6.x view slitaz-configs/receipt @ rev 24069
Add some current_version()
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jul 06 11:01:20 2021 +0000 (2021-07-06) |
parents | b6120eeb6704 |
children | db9d9cb3c164 |
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-configs"
4 VERSION="318"
5 CATEGORY="base-system"
6 SHORT_DESC="SliTaz config files and artwork."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="http://www.slitaz.org/"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WGET_URL="http://hg.slitaz.org/slitaz-configs/archive/$VERSION.tar.gz"
12 HOST_ARCH="i486 arm"
14 DEPENDS="slitaz-configs-base xorg-libXcomposite xorg-libXdamage \
15 xorg-xcompmgr transset-df ttf-dejavu slim"
16 BUILD_DEPENDS="" # see below
17 SIBLINGS="slitaz-configs-base"
19 # Special case for ARM since some (most) config files are in slitaz-arm repo.
20 # i486/arm common configs are provided by slitaz-configs-base.
21 case "$SLITAZ_ARCH" in
22 i?86) CONFIG_FILES="/etc/slitaz/applications.conf" ;;
23 arm*) DEPENDS="slitaz-arm-configs ttf-dejavu slim" ;;
24 esac
26 case "$ARCH" in
27 i?86*) BUILD_DEPENDS="gettext locale-fr locale-hu locale-ja locale-pt_BR \
28 locale-ru locale-zh_CN" ;;
29 esac
31 current_version()
32 {
33 wget -O - http://hg.slitaz.org/$PACKAGE/ 2>/dev/null | \
34 sed '/^Changeset/!d;s|.*">|http://hg.slitaz.org/'$PACKAGE'/rev/|;s|<.*||' | \
35 xargs wget -O - 2>/dev/null | sed '/rev /!d;s|.*rev ||;s| .*||'
36 }
38 # Rules to configure and make the package.
39 compile_rules()
40 {
41 case "$ARCH" in
42 i?86)
43 make DESTDIR=$DESTDIR menu
44 ln -s menu.en.xml $install/etc/xdg/openbox/menu.xml
45 ;;
46 esac
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 cd ${src}
53 case "$ARCH" in
54 i?86)
55 # Copy rootfs files from the stuff and set permissions.
56 mkdir -p $fs/etc/xdg/openbox $fs/usr/share
57 cp -a $src/rootfs/etc/xdg/openbox $fs/etc/xdg
59 # /usr/share
60 for i in applications lxdm slim slitaz
61 do
62 cp -r $src/rootfs/usr/share/$i $fs/usr/share
63 done
64 cp -a $src/rootfs/usr/bin $fs/usr
65 cp -a $src/rootfs/etc/lxpanel $fs/etc
66 cp -a $src/rootfs/etc/slitaz $fs/etc
67 cp -a $install/etc/xdg/openbox/menu.en.xml \
68 $install/etc/xdg/openbox/menu.xml \
69 $fs/etc/xdg/openbox ;;
70 arm)
71 mkdir -p $fs/usr/share
72 cp -a $src/rootfs/usr/share/applications $fs/usr/share
73 cp -a $src/rootfs/usr/share/slitaz $fs/usr/share ;;
74 esac
76 # Put LXPanel profile to /etc/skel for new users
77 mkdir -p $fs/etc/skel/.config/lxpanel
78 cp -a $fs/etc/lxpanel/slitaz $fs/etc/skel/.config/lxpanel
80 chown -R root.root $fs
81 }
83 post_install()
84 {
85 case "$SLITAZ_ARCH" in
86 i?86)
87 # By default slim provide a base theme and config file have both
88 # base and slitaz who will be choose randomly, so make sure we use
89 # only slitaz theme.
90 if grep -q 'current_theme slitaz,base' "$1/etc/slim.conf"; then
91 sed -i s/"current_theme .*"/"current_theme slitaz"/ \
92 "$1/etc/slim.conf"
93 fi ;;
94 esac
95 }