wok-next view razorqt/receipt @ rev 20943
Random updates
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Aug 30 10:49:57 2018 +0300 (2018-08-30) |
parents | d43bf7aae921 |
children | d5aab818505e |
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"
23 COOKOPTS="!menus"
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 cmake -DCMAKE_INSTALL_PREFIX=/usr .
29 make && make install
31 # save space (png -> jpg)
32 cd $install/usr/share/razor/themes/light
33 convert ./simple_blue_widescreen.png ./simple_blue_widescreen.jpg
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 case $PACKAGE in
40 razorqt)
41 DEPENDS="libQtDBus libQtGui libmagic libstatgrab \
42 xorg-libXcomposite xorg-libXcursor xorg-libXdamage \
43 lightdm-qt"
44 SUGGESTED="razorqt-themes razorqt-appswitcher razorqt-power \
45 razorqt-runner razorqt-autosuspend"
47 # copy all, then remove unneeded
48 cp -a $install/* $fs
50 # Dev-files --> razorqt-dev
51 rm -rf $fs/usr/include
52 rm -rf $fs/usr/lib/pkgconfig
54 # Language-files --> razorqt-locale-*
55 find $fs -name '*.qm' -delete
57 # Appswitcher --> razorqt-appswitcher
58 rm -f $fs/usr/bin/razor-appswitcher
59 rm -f $fs/etc/xdg/autostart/razor-appswitcher.desktop
61 # Autosuspend --> razorqt-autosuspend
62 rm -f $fs/usr/bin/razor-autosuspend
63 rm -f $fs/usr/bin/razor-config-autosuspend
64 rm -f $fs/etc/xdg/autostart/razor-autosuspend.desktop
65 rm -f $fs/usr/share/applications/razor-config-autosuspend.desktop
67 # Policykit-agent --> razorqt-policykit-agent
68 rm -f $fs/usr/bin/razor-policykit-agent
69 rm -f $fs/etc/xdg/autostart/razor-policykit-agent.desktop
71 # Power --> razorqt-power
72 rm -f $fs/usr/bin/razor-power
73 rm -f $fs/usr/share/applications/razor-power.desktop
75 # Runner --> razorqt-runner
76 rm -f $fs/usr/bin/razor-runner
77 rm -f $fs/etc/xdg/autostart/razor-runner.desktop
79 # Themes (all but light) --> razorqt-themes
80 find $fs/usr/share/razor/themes -maxdepth 1 -mindepth 1 -type d \
81 \( ! -name light \) -exec rm -rf \{\} \;
82 rm -f $fs/usr/share/razor/themes/light/simple_blue_widescreen.png
83 rm -f $fs/usr/share/razor/themes/light/96640-simple_blue_widescreen.svg
84 sed 's|png|jpg|' -i $fs/usr/share/razor/themes/light/wallpaper.cfg
86 # Remove confupdate (Port desktop.conf syntax from 0.4.x to 0.5.0 format)
87 rm -f $fs/usr/bin/razor-confupdate
88 rm -rf $fs/usr/lib/razor-confupdate_bin
89 rm -rf $fs/usr/share/razor/razor-confupdate
91 # Remove heavy graphics
92 rm -f $fs/usr/share/razor/graphics/rqt*
94 # Remove file - not use KDM
95 rm -rf $fs/usr/share/apps
97 # Remove empty folders
98 for dir in $(find $fs/usr/share -type d); do
99 rmdir --ignore-fail-on-non-empty $dir
100 done
102 # Custom SliTaz integration
103 cp -a $stuff/*.conf $fs/etc/razor
104 ;;
105 razorqt-appswitcher)
106 CAT="x-window|Razor-qt Apps switcher plugin."
107 DEPENDS="razorqt"
108 mkdir -p $fs/usr/bin $fs/etc/xdg/autostart
109 cp -a $install/usr/bin/razor-appswitcher $fs/usr/bin
110 cp -a $install/etc/xdg/autostart/razor-appswitcher.desktop \
111 $fs/etc/xdg/autostart
112 ;;
113 razorqt-autosuspend)
114 CAT="x-window|Razor-qt suspend manage application tool."
115 DEPENDS="razorqt"
116 mkdir -p \
117 $fs/usr/bin \
118 $fs/etc/xdg/autostart \
119 $fs/usr/share/applications
120 cp -a $install/usr/bin/razor-autosuspend $fs/usr/bin
121 cp -a $install/usr/bin/razor-config-autosuspend $fs/usr/bin
122 cp -a $install/etc/xdg/autostart/razor-autosuspend.desktop \
123 $fs/etc/xdg/autostart
124 cp $install/usr/share/applications/razor-config-autosuspend.desktop \
125 $fs/usr/share/applications
126 ;;
127 razorqt-dev)
128 CAT="development|Development files for the QT based Razor desktop"
129 DEPENDS="Qt4-dev"
130 mkdir -p $fs/usr/lib
131 cp -a $install/usr/lib/pkgconfig $fs/usr/lib
132 cp -a $install/usr/include $fs/usr
133 ;;
134 razorqt-locale-misc)
135 CAT="localization|Miscelaneous locales for Razor-qt not included in razorqt-locale-*"
136 LOCALES="cs da de el es fr hu id it pl pt ru sl sv uk zh"
138 # copy all translations
139 cd $install
140 qms=$(find . -name "*.qm" | sed 's|^.||')
141 for qm in $qms; do
142 mkdir -p $(dirname $fs$qm)
143 cp -a $install$qm $fs$qm
144 done
145 # remove translations that exists in razorqt-locale-*
146 for locale in $LOCALES; do
147 cook razorqt-locale-$locale
148 for qm in $(cat $WOK/razorqt-locale-$locale/taz/*/files.list); do
149 rm -f $fs$qm
150 done
151 done
152 ;;
153 razorqt-locale-*)
154 LOCALE="${PACKAGE#razorqt-locale-}"
155 while read code name; do
156 [ $code == $LOCALE ] && break
157 done <<EOT
158 cs Czech
159 da Danish
160 de German
161 el Greek
162 es Spanish
163 fr French
164 hu Hungarian
165 id Indonesian
166 it Italian
167 pl Polish
168 pt Portuguese
169 ru Russian
170 sl Slovenian
171 sv Swedish
172 uk Ukrainian
173 zh Chinese
174 EOT
175 CAT="localization|$name locale for Razor-qt"
176 cd $install
177 qms=$(find . \( -name "*_$LOCALE.qm" \) -o \( -name "*_${LOCALE}_*.qm" \) | sed 's|^.||')
178 for qm in $qms; do
179 mkdir -p $(dirname $fs$qm)
180 cp -a $install$qm $fs$qm
181 done
182 ;;
183 razorqt-policykit-agent)
184 CAT="x-window|Razor-qt lightweight PolicyKit agent/user interface."
185 DEPENDS="razorqt polkit polkit-qt"
186 mkdir -p $fs/usr/bin $fs/etc/xdg/autostart
187 cp -a $install/usr/bin/razor-policykit-agent $fs/usr/bin
188 cp -a $install/etc/xdg/autostart/razor-policykit-agent.desktop \
189 $fs/etc/xdg/autostart
190 ;;
191 razorqt-power)
192 CAT="x-window|Razor-qt power management component."
193 DEPENDS="razorqt upower"
194 mkdir -p $fs/usr/bin $fs/usr/share/applications
195 cp -a $install/usr/bin/razor-power $fs/usr/bin
196 cp $install/usr/share/applications/razor-power.desktop \
197 $fs/usr/share/applications
198 ;;
199 razorqt-runner)
200 CAT="x-window|Razor-qt quick launch and runner application."
201 DEPENDS="razorqt"
202 mkdir -p $fs/usr/bin $fs/etc/xdg/autostart
203 cp -a $install/usr/bin/razor-runner $fs/usr/bin
204 cp -a $install/etc/xdg/autostart/razor-runner.desktop \
205 $fs/etc/xdg/autostart
206 ;;
207 razorqt-themes)
208 CAT="x-window|Extra themes for Razor-qt desktop"
209 DEPENDS="razorqt"
210 mkdir -p $fs/usr/share/razor
211 cp -a $install/usr/share/razor/themes $fs/usr/share/razor
212 rm -rf $fs/usr/share/razor/themes/light
214 # remove heavy graphics
215 rm -f $fs/usr/share/razor/themes/*/wow5.png
216 rm -f $fs/usr/share/razor/themes/*/wow5_12*.jpg
217 rm -f $fs/usr/share/razor/themes/*/wow5_16*.jpg
218 rm -f $fs/usr/share/razor/themes/*/wow5_19*.jpg
219 rm -f $fs/usr/share/razor/themes/*/wow5_20*.jpg
220 for theme in a-mego ambiance; do
221 cat > $fs/usr/share/razor/themes/$theme/wallpaper.cfg << EOT
222 wallpapers/size=1
223 wallpapers/1/file=wow5_1024x768.jpg
224 EOT
225 done
226 ;;
227 esac
228 }
230 post_install_razorqt()
231 {
232 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
233 # Adding WM to SLIM available sessions.
234 if ! echo "$res" | grep -q $PACKAGE; then
235 echo -n "Adding $PACKAGE to /etc/slim.conf..."
236 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" "$1/etc/slim.conf"
237 status
238 fi
239 true
240 }
242 post_remove_razorqt()
243 {
244 # Remove WM from SLIM available sessions.
245 if grep -q $PACKAGE "$1/etc/slim.conf"; then
246 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
247 fi
248 }