wok-next view slitaz-configs/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents cd7906120828
children 5669e8b3be70
line source
1 # SliTaz package receipt v2.
3 PACKAGE="slitaz-configs"
4 VERSION="312"
5 CATEGORY="base-system"
6 SHORT_DESC="SliTaz config files"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="http://www.slitaz.org/"
10 REPOLOGY="-"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WGET_URL="http://hg.slitaz.org/slitaz-configs/archive/$VERSION.tar.bz2"
15 BUILD_DEPENDS="locale-de locale-en locale-fr locale-hu locale-ja locale-pt_BR \
16 locale-ru locale-zh_CN gettext-dev"
17 SPLIT="slitaz-themes $PACKAGE-base"
19 compile_rules() {
20 # xcompmgr produces visual glitches on the screen
21 sed -i 's|xcompmgr|compton|' ob-menu/menu.xml.in
22 make DESTDIR=$install menu
23 ln -s menu.en.xml $install/etc/xdg/openbox/menu.xml
25 find /usr/share/locale -type f -name 'slitaz*'
27 cp -a $src/rootfs/* $install
29 # Put applications.conf to /etc/skel
30 mkdir -p $install/etc/skel/.config/slitaz/
31 cp -a $install/etc/slitaz/applications.conf $install/etc/skel/.config/slitaz/
33 cd $install/etc/skel
34 mkdir -p Desktop Documents Downloads Images Music Public Templates Videos
36 # actually isolinux splash is png
37 mv $install/boot/isolinux/splash.jpg $install/boot/isolinux/splash.png
39 # LXPanel settings are in lxpanel package
40 rm -r $install/etc/lxpanel
42 # Polkit *.pkla files are not working anymore,
43 # Polkit switches to javascript-based rules
44 rm -r $install/etc/polkit-1
46 # LXsession settings are in lxsession package
47 rm -r $install/etc/skel/.config/lxsession
49 # Beaver is gone...
50 sed -i 's|beaver|leafpad|' $install/usr/share/applications/defaults.list
52 # SliTaz backgrounds in the slitaz-next package
53 rm $install/usr/share/images/slitaz-background*
55 # SLiM theme in the slim package
56 rm -r $install/usr/share/slim
58 # PCManFM settings in the pcmanfm package
59 rm -r $install/usr/share/slitaz/lxde
61 # Remove templates, use that in /usr/share/templates/ only
62 rm $install/etc/skel/Templates/*
64 # Now we need ConsoleKit
65 sed -i 's|exec dbus-launch|exec ck-launch-session dbus-launch|' $install/etc/skel/.xinitrc
67 # Enable colored terminal prompt by default
68 sed -i '/PS1.*m/ s|#PS1=|PS1=|' $install/etc/skel/.profile
69 chown -R root:root $install
70 }
72 genpkg_rules() {
73 case $PACKAGE in
74 slitaz-configs)
75 # Common configs are provided by slitaz-configs-base.
76 copy \
77 /etc/skel/.gtkrc-2.0* \
78 /etc/skel/.icons/ \
79 /etc/skel/.Xdefaults \
80 /etc/skel/.xinitrc \
81 /etc/skel/.Xresources \
82 /etc/skel/.xsession \
83 /etc/xdg/openbox/autostart \
84 /etc/xdg/openbox/environment \
85 /etc/xdg/openbox/menu.en.xml \
86 /etc/xdg/openbox/menu.xml \
87 /etc/xdg/openbox/rc.xml \
88 /usr/bin/ \
89 /usr/share/applications/ \
90 /usr/share/images/ \
91 /usr/share/pixmaps/ \
92 /usr/share/slitaz/ \
93 /usr/share/templates/ \
94 /usr/share/webhome/ \
95 /root/
96 DEPENDS="slitaz-configs-base xorg-libXcomposite \
97 xorg-libXdamage transset-df ttf-dejavu slim compton"
98 CAT="base-system|for GUI systems"
99 ;;
100 slitaz-themes)
101 copy \
102 /usr/share/themes/SliTaz*/ \
103 /usr/share/slim/ \
104 /usr/share/lxdm/
105 CAT="customization|GTK+2, Openbox3, LXDM and SLiM themes"
106 DEPENDS="slim"
107 ;;
108 slitaz-configs-base)
109 copy \
110 /boot/ \
111 /etc/skel/ \
112 /etc/polkit-1/ \
113 /etc/slitaz/ \
114 /usr/share/ \
115 /root/ \
116 @rm
117 CAT="base-system|for text based systems"
118 CONFIG_FILES="/etc/slitaz/applications.conf"
119 DEPENDS=" "
120 ;;
121 esac
122 }
124 # By default SLiM provide a base theme and config file have both
125 # base and slitaz who will be choose randomly, so make sure we use
126 # only slitaz theme.
127 post_install_slitaz_themes() {
128 chroot "$1/" slim-theme -s slitaz
129 }
130 pre_remove_slitaz_themes() {
131 chroot "$1/" slim-theme -f slitaz
132 }
134 post_install_slitaz_configs() {
135 for i in $(ls -d "$1/root" "$1"/home/* 2>/dev/null); do
136 [ -d "$i" ] && cp -f "$1/etc/skel/.xinitrc" "$i"
137 done
138 sed -i 's|$HOME/.config|/etc|' "$1/root/.xinitrc"
139 chmod 0750 $1/root
140 }