wok-next view razorqt/receipt @ rev 21078
Update png and Xorg in dependencies.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Dec 22 04:52:35 2018 +0200 (2018-12-22) |
parents | d5aab818505e |
children |
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="devel@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="\
17 $PACKAGE-appswitcher $PACKAGE-autosuspend $PACKAGE-dev \
18 $PACKAGE-locale-cs $PACKAGE-locale-da $PACKAGE-locale-de \
19 $PACKAGE-locale-el $PACKAGE-locale-es $PACKAGE-locale-fr \
20 $PACKAGE-locale-hu $PACKAGE-locale-id $PACKAGE-locale-it \
21 $PACKAGE-locale-misc $PACKAGE-locale-pl $PACKAGE-locale-pt \
22 $PACKAGE-locale-ru $PACKAGE-locale-sl $PACKAGE-locale-sv \
23 $PACKAGE-locale-uk $PACKAGE-locale-zh $PACKAGE-policykit-agent \
24 $PACKAGE-power $PACKAGE-runner $PACKAGE-themes"
26 COOKOPTS="!menus"
28 compile_rules() {
29 cmake \
30 -DCMAKE_INSTALL_PREFIX=/usr \
31 . &&
32 make &&
33 make install
35 # save space (png -> jpg)
36 cd $install/usr/share/razor/themes/light
37 convert ./simple_blue_widescreen.png ./simple_blue_widescreen.jpg
38 }
40 genpkg_rules() {
41 case $PACKAGE in
42 razorqt)
43 DEPENDS="libQtDBus libQtGui libmagic libstatgrab \
44 libxcomposite libxcursor libxdamage \
45 lightdm-qt"
46 SUGGESTED="razorqt-themes razorqt-appswitcher razorqt-power \
47 razorqt-runner razorqt-autosuspend"
49 # copy all, then remove unneeded
50 cp -a $install/* $fs
52 # Dev-files --> razorqt-dev
53 rm -rf $fs/usr/include
54 rm -rf $fs/usr/lib/pkgconfig
56 # Language-files --> razorqt-locale-*
57 find $fs -name '*.qm' -delete
59 # Appswitcher --> razorqt-appswitcher
60 rm -f $fs/usr/bin/razor-appswitcher
61 rm -f $fs/etc/xdg/autostart/razor-appswitcher.desktop
63 # Autosuspend --> razorqt-autosuspend
64 rm -f $fs/usr/bin/razor-autosuspend
65 rm -f $fs/usr/bin/razor-config-autosuspend
66 rm -f $fs/etc/xdg/autostart/razor-autosuspend.desktop
67 rm -f $fs/usr/share/applications/razor-config-autosuspend.desktop
69 # Policykit-agent --> razorqt-policykit-agent
70 rm -f $fs/usr/bin/razor-policykit-agent
71 rm -f $fs/etc/xdg/autostart/razor-policykit-agent.desktop
73 # Power --> razorqt-power
74 rm -f $fs/usr/bin/razor-power
75 rm -f $fs/usr/share/applications/razor-power.desktop
77 # Runner --> razorqt-runner
78 rm -f $fs/usr/bin/razor-runner
79 rm -f $fs/etc/xdg/autostart/razor-runner.desktop
81 # Themes (all but light) --> razorqt-themes
82 find $fs/usr/share/razor/themes -maxdepth 1 -mindepth 1 -type d \
83 \( ! -name light \) -exec rm -rf \{\} \;
84 rm -f $fs/usr/share/razor/themes/light/simple_blue_widescreen.png
85 rm -f $fs/usr/share/razor/themes/light/96640-simple_blue_widescreen.svg
86 sed 's|png|jpg|' -i $fs/usr/share/razor/themes/light/wallpaper.cfg
88 # Remove confupdate (Port desktop.conf syntax from 0.4.x to 0.5.0 format)
89 rm -f $fs/usr/bin/razor-confupdate
90 rm -rf $fs/usr/lib/razor-confupdate_bin
91 rm -rf $fs/usr/share/razor/razor-confupdate
93 # Remove heavy graphics
94 rm -f $fs/usr/share/razor/graphics/rqt*
96 # Remove file - not use KDM
97 rm -rf $fs/usr/share/apps
99 # Remove empty folders
100 for dir in $(find $fs/usr/share -type d); do
101 rmdir --ignore-fail-on-non-empty $dir
102 done
104 # Custom SliTaz integration
105 cp -a $stuff/*.conf $fs/etc/razor
106 ;;
107 *-appswitcher)
108 CAT="x-window|apps switcher plugin"
109 DEPENDS="razorqt"
110 mkdir -p $fs/usr/bin $fs/etc/xdg/autostart
111 cp -a $install/usr/bin/razor-appswitcher $fs/usr/bin
112 cp -a $install/etc/xdg/autostart/razor-appswitcher.desktop \
113 $fs/etc/xdg/autostart
114 ;;
115 *-autosuspend)
116 CAT="x-window|suspend manage application tool"
117 DEPENDS="razorqt"
118 mkdir -p \
119 $fs/usr/bin \
120 $fs/etc/xdg/autostart \
121 $fs/usr/share/applications
122 cp -a $install/usr/bin/razor-autosuspend $fs/usr/bin
123 cp -a $install/usr/bin/razor-config-autosuspend $fs/usr/bin
124 cp -a $install/etc/xdg/autostart/razor-autosuspend.desktop \
125 $fs/etc/xdg/autostart
126 cp $install/usr/share/applications/razor-config-autosuspend.desktop \
127 $fs/usr/share/applications
128 ;;
129 *-dev)
130 CAT="development|Development files for the QT based Razor desktop"
131 DEPENDS="Qt4-dev"
132 mkdir -p $fs/usr/lib
133 cp -a $install/usr/lib/pkgconfig $fs/usr/lib
134 cp -a $install/usr/include $fs/usr
135 ;;
136 *-locale-misc)
137 CAT="localization|Miscelaneous locales for Razor-qt not included in razorqt-locale-*"
138 LOCALES="cs da de el es fr hu id it pl pt ru sl sv uk zh"
140 # copy all translations
141 cd $install
142 qms=$(find . -name "*.qm" | sed 's|^.||')
143 for qm in $qms; do
144 mkdir -p $(dirname $fs$qm)
145 cp -a $install$qm $fs$qm
146 done
147 # remove translations that exists in razorqt-locale-*
148 for locale in $LOCALES; do
149 cook razorqt-locale-$locale
150 for qm in $(cat $WOK/razorqt-locale-$locale/taz/*/files.list); do
151 rm -f $fs$qm
152 done
153 done
154 ;;
155 *-locale-*)
156 LOCALE="${PACKAGE#razorqt-locale-}"
157 while read code name; do
158 [ $code == $LOCALE ] && break
159 done <<EOT
160 cs Czech
161 da Danish
162 de German
163 el Greek
164 es Spanish
165 fr French
166 hu Hungarian
167 id Indonesian
168 it Italian
169 pl Polish
170 pt Portuguese
171 ru Russian
172 sl Slovenian
173 sv Swedish
174 uk Ukrainian
175 zh Chinese
176 EOT
177 CAT="localization|$name locale"
178 cd $install
179 qms=$(find . \( -name "*_$LOCALE.qm" \) -o \( -name "*_${LOCALE}_*.qm" \) | sed 's|^.||')
180 for qm in $qms; do
181 mkdir -p $(dirname $fs$qm)
182 cp -a $install$qm $fs$qm
183 done
184 ;;
185 *-policykit-agent)
186 CAT="x-window|lightweight PolicyKit agent/user interface"
187 DEPENDS="razorqt polkit polkit-qt"
188 mkdir -p $fs/usr/bin $fs/etc/xdg/autostart
189 cp -a $install/usr/bin/razor-policykit-agent $fs/usr/bin
190 cp -a $install/etc/xdg/autostart/razor-policykit-agent.desktop \
191 $fs/etc/xdg/autostart
192 ;;
193 *-power)
194 CAT="x-window|power management component"
195 DEPENDS="razorqt upower"
196 mkdir -p $fs/usr/bin $fs/usr/share/applications
197 cp -a $install/usr/bin/razor-power $fs/usr/bin
198 cp $install/usr/share/applications/razor-power.desktop \
199 $fs/usr/share/applications
200 ;;
201 *-runner)
202 CAT="x-window|quick launch and runner application"
203 DEPENDS="razorqt"
204 mkdir -p $fs/usr/bin $fs/etc/xdg/autostart
205 cp -a $install/usr/bin/razor-runner $fs/usr/bin
206 cp -a $install/etc/xdg/autostart/razor-runner.desktop \
207 $fs/etc/xdg/autostart
208 ;;
209 *-themes)
210 CAT="x-window|extra themes"
211 DEPENDS="razorqt"
212 mkdir -p $fs/usr/share/razor
213 cp -a $install/usr/share/razor/themes $fs/usr/share/razor
214 rm -rf $fs/usr/share/razor/themes/light
216 # remove heavy graphics
217 rm -f $fs/usr/share/razor/themes/*/wow5.png
218 rm -f $fs/usr/share/razor/themes/*/wow5_12*.jpg
219 rm -f $fs/usr/share/razor/themes/*/wow5_16*.jpg
220 rm -f $fs/usr/share/razor/themes/*/wow5_19*.jpg
221 rm -f $fs/usr/share/razor/themes/*/wow5_20*.jpg
222 for theme in a-mego ambiance; do
223 cat > $fs/usr/share/razor/themes/$theme/wallpaper.cfg << EOT
224 wallpapers/size=1
225 wallpapers/1/file=wow5_1024x768.jpg
226 EOT
227 done
228 ;;
229 esac
230 }
232 post_install_razorqt() {
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 # 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 }