wok-next view razorqt/receipt @ rev 20160

cdrkit: receipt v2
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 01 17:19:39 2017 +0100 (2017-11-01)
parents e70c0b9c5adf
children d43bf7aae921
line source
1 # SliTaz package receipt v2.
3 PACKAGE="razorqt"
4 VERSION="0.5.2"
5 CATEGORY="x-window"
6 SHORT_DESC="Light and fast QT based Desktop Environment."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2 LGPL2.1"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://razor-qt.org/"
11 WGET_URL="http://razor-qt.org/downloads/$TARBALL"
13 BUILD_DEPENDS="cmake Qt4-dev qmake xorg-dev libmagic-dev upower-dev \
14 grep libstatgrab-dev alsa-lib-dev polkit-dev polkit-qt-dev glib-dev \
15 lightdm-qt-dev imagemagick"
16 SPLIT="razorqt-appswitcher razorqt-autosuspend razorqt-dev razorqt-locale-cs \
17 razorqt-locale-da razorqt-locale-de razorqt-locale-el razorqt-locale-es \
18 razorqt-locale-fr razorqt-locale-hu razorqt-locale-id razorqt-locale-it \
19 razorqt-locale-misc razorqt-locale-pl razorqt-locale-pt razorqt-locale-ru \
20 razorqt-locale-sl razorqt-locale-sv razorqt-locale-uk razorqt-locale-zh \
21 razorqt-policykit-agent razorqt-power razorqt-runner razorqt-themes"
24 GENERIC_MENUS="no"
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 cmake -DCMAKE_INSTALL_PREFIX=/usr .
30 make && make install
32 # save space (png -> jpg)
33 cd $install/usr/share/razor/themes/light
34 convert ./simple_blue_widescreen.png ./simple_blue_widescreen.jpg
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 case $PACKAGE in
41 razorqt)
42 DEPENDS="libQtDBus libQtGui libmagic libstatgrab \
43 xorg-libXcomposite xorg-libXcursor xorg-libXdamage \
44 lightdm-qt"
45 SUGGESTED="razorqt-themes razorqt-appswitcher razorqt-power \
46 razorqt-runner razorqt-autosuspend"
48 # copy all, then remove unneeded
49 cp -a $install/* $fs
51 # Dev-files --> razorqt-dev
52 rm -rf $fs/usr/include
53 rm -rf $fs/usr/lib/pkgconfig
55 # Language-files --> razorqt-locale-*
56 find $fs -name '*.qm' -delete
58 # Appswitcher --> razorqt-appswitcher
59 rm -f $fs/usr/bin/razor-appswitcher
60 rm -f $fs/etc/xdg/autostart/razor-appswitcher.desktop
62 # Autosuspend --> razorqt-autosuspend
63 rm -f $fs/usr/bin/razor-autosuspend
64 rm -f $fs/usr/bin/razor-config-autosuspend
65 rm -f $fs/etc/xdg/autostart/razor-autosuspend.desktop
66 rm -f $fs/usr/share/applications/razor-config-autosuspend.desktop
68 # Policykit-agent --> razorqt-policykit-agent
69 rm -f $fs/usr/bin/razor-policykit-agent
70 rm -f $fs/etc/xdg/autostart/razor-policykit-agent.desktop
72 # Power --> razorqt-power
73 rm -f $fs/usr/bin/razor-power
74 rm -f $fs/usr/share/applications/razor-power.desktop
76 # Runner --> razorqt-runner
77 rm -f $fs/usr/bin/razor-runner
78 rm -f $fs/etc/xdg/autostart/razor-runner.desktop
80 # Themes (all but light) --> razorqt-themes
81 find $fs/usr/share/razor/themes -maxdepth 1 -mindepth 1 -type d \
82 \( ! -name light \) -exec rm -rf \{\} \;
83 rm -f $fs/usr/share/razor/themes/light/simple_blue_widescreen.png
84 rm -f $fs/usr/share/razor/themes/light/96640-simple_blue_widescreen.svg
85 sed 's|png|jpg|' -i $fs/usr/share/razor/themes/light/wallpaper.cfg
87 # Remove confupdate (Port desktop.conf syntax from 0.4.x to 0.5.0 format)
88 rm -f $fs/usr/bin/razor-confupdate
89 rm -rf $fs/usr/lib/razor-confupdate_bin
90 rm -rf $fs/usr/share/razor/razor-confupdate
92 # Remove heavy graphics
93 rm -f $fs/usr/share/razor/graphics/rqt*
95 # Remove file - not use KDM
96 rm -rf $fs/usr/share/apps
98 # Remove empty folders
99 for dir in $(find $fs/usr/share -type d); do
100 rmdir --ignore-fail-on-non-empty $dir
101 done
103 # Custom SliTaz integration
104 cp -a $stuff/*.conf $fs/etc/razor
105 ;;
106 razorqt-appswitcher)
107 CAT="x-window|Razor-qt Apps switcher plugin."
108 DEPENDS="razorqt"
109 mkdir -p $fs/usr/bin $fs/etc/xdg/autostart
110 cp -a $install/usr/bin/razor-appswitcher $fs/usr/bin
111 cp -a $install/etc/xdg/autostart/razor-appswitcher.desktop \
112 $fs/etc/xdg/autostart
113 ;;
114 razorqt-autosuspend)
115 CAT="x-window|Razor-qt suspend manage application tool."
116 DEPENDS="razorqt"
117 mkdir -p \
118 $fs/usr/bin \
119 $fs/etc/xdg/autostart \
120 $fs/usr/share/applications
121 cp -a $install/usr/bin/razor-autosuspend $fs/usr/bin
122 cp -a $install/usr/bin/razor-config-autosuspend $fs/usr/bin
123 cp -a $install/etc/xdg/autostart/razor-autosuspend.desktop \
124 $fs/etc/xdg/autostart
125 cp $install/usr/share/applications/razor-config-autosuspend.desktop \
126 $fs/usr/share/applications
127 ;;
128 razorqt-dev)
129 CAT="development|Development files for the QT based Razor desktop"
130 DEPENDS="Qt4-dev pkg-config"
131 mkdir -p $fs/usr/lib
132 cp -a $install/usr/lib/pkgconfig $fs/usr/lib
133 cp -a $install/usr/include $fs/usr
134 ;;
135 razorqt-locale-misc)
136 CAT="localization|Miscelaneous locales for Razor-qt not included in razorqt-locale-*"
137 LOCALES="cs da de el es fr hu id it pl pt ru sl sv uk zh"
139 # copy all translations
140 cd $install
141 qms=$(find . -name "*.qm" | sed 's|^.||')
142 for qm in $qms; do
143 mkdir -p $(dirname $fs$qm)
144 cp -a $install$qm $fs$qm
145 done
146 # remove translations that exists in razorqt-locale-*
147 for locale in $LOCALES; do
148 cook razorqt-locale-$locale
149 for qm in $(cat $WOK/razorqt-locale-$locale/taz/*/files.list); do
150 rm -f $fs$qm
151 done
152 done
153 ;;
154 razorqt-locale-*)
155 LOCALE="${PACKAGE#razorqt-locale-}"
156 while read code name; do
157 [ $code == $LOCALE ] && break
158 done <<EOT
159 cs Czech
160 da Danish
161 de German
162 el Greek
163 es Spanish
164 fr French
165 hu Hungarian
166 id Indonesian
167 it Italian
168 pl Polish
169 pt Portuguese
170 ru Russian
171 sl Slovenian
172 sv Swedish
173 uk Ukrainian
174 zh Chinese
175 EOT
176 CAT="localization|$name locale for Razor-qt"
177 cd $install
178 qms=$(find . \( -name "*_$LOCALE.qm" \) -o \( -name "*_${LOCALE}_*.qm" \) | sed 's|^.||')
179 for qm in $qms; do
180 mkdir -p $(dirname $fs$qm)
181 cp -a $install$qm $fs$qm
182 done
183 ;;
184 razorqt-policykit-agent)
185 CAT="x-window|Razor-qt lightweight PolicyKit agent/user interface."
186 DEPENDS="razorqt polkit polkit-qt"
187 mkdir -p $fs/usr/bin $fs/etc/xdg/autostart
188 cp -a $install/usr/bin/razor-policykit-agent $fs/usr/bin
189 cp -a $install/etc/xdg/autostart/razor-policykit-agent.desktop \
190 $fs/etc/xdg/autostart
191 ;;
192 razorqt-power)
193 CAT="x-window|Razor-qt power management component."
194 DEPENDS="razorqt upower"
195 mkdir -p $fs/usr/bin $fs/usr/share/applications
196 cp -a $install/usr/bin/razor-power $fs/usr/bin
197 cp $install/usr/share/applications/razor-power.desktop \
198 $fs/usr/share/applications
199 ;;
200 razorqt-runner)
201 CAT="x-window|Razor-qt quick launch and runner application."
202 DEPENDS="razorqt"
203 mkdir -p $fs/usr/bin $fs/etc/xdg/autostart
204 cp -a $install/usr/bin/razor-runner $fs/usr/bin
205 cp -a $install/etc/xdg/autostart/razor-runner.desktop \
206 $fs/etc/xdg/autostart
207 ;;
208 razorqt-themes)
209 CAT="x-window|Extra themes for Razor-qt desktop"
210 DEPENDS="razorqt"
211 mkdir -p $fs/usr/share/razor
212 cp -a $install/usr/share/razor/themes $fs/usr/share/razor
213 rm -rf $fs/usr/share/razor/themes/light
215 # remove heavy graphics
216 rm -f $fs/usr/share/razor/themes/*/wow5.png
217 rm -f $fs/usr/share/razor/themes/*/wow5_12*.jpg
218 rm -f $fs/usr/share/razor/themes/*/wow5_16*.jpg
219 rm -f $fs/usr/share/razor/themes/*/wow5_19*.jpg
220 rm -f $fs/usr/share/razor/themes/*/wow5_20*.jpg
221 for theme in a-mego ambiance; do
222 cat > $fs/usr/share/razor/themes/$theme/wallpaper.cfg << EOT
223 wallpapers/size=1
224 wallpapers/1/file=wow5_1024x768.jpg
225 EOT
226 done
227 ;;
228 esac
229 }
231 post_install_razorqt()
232 {
233 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
234 # Adding WM to SLIM available sessions.
235 if ! echo "$res" | grep -q $PACKAGE; then
236 echo -n "Adding $PACKAGE to /etc/slim.conf..."
237 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" "$1/etc/slim.conf"
238 status
239 fi
240 true
241 }
243 post_remove_razorqt()
244 {
245 # Remove WM from SLIM available sessions.
246 if grep -q $PACKAGE "$1/etc/slim.conf"; then
247 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
248 fi
249 }