wok view razorqt/receipt @ rev 22850

bluez: add v4 deprecated tools (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 16 19:19:37 2020 +0100 (2020-02-16)
parents eb4c6cf9f3a5
children 5ea0ce1cecc0
line source
1 # SliTaz package receipt.
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="https://github.com/Razor-qt/razor-qt"
11 WGET_URL="https://github.com/Razor-qt/razor-qt/archive/$VERSION.tar.gz"
12 SUGGESTED="razorqt-themes razorqt-appswitcher razorqt-power \
13 razorqt-runner razorqt-autosuspend"
15 BUILD_DEPENDS="cmake Qt4-dev qmake xorg-dev libmagic-dev upower-dev \
16 grep libstatgrab-dev alsa-lib-dev polkit-dev polkit-qt-dev glib-dev \
17 libgio-dev lightdm-qt-dev imagemagick"
18 DEPENDS="libQtDBus libQtGui libmagic libstatgrab xorg-libXcomposite \
19 xorg-libXcursor xorg-libXdamage lightdm-qt"
21 GENERIC_MENUS="no"
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 sed -i 's|sg_init()|sg_init(1)|' \
27 razorqt-panel/plugin-networkmonitor/razornetworkmonitor.cpp \
28 razorqt-panel/plugin-cpuload/razorcpuload.cpp
29 sed -i 's|sg_get_cpu_percents()|sg_get_cpu_percents(NULL)|' \
30 razorqt-panel/plugin-cpuload/razorcpuload.cpp
31 sed -i 's|int \(.*num_network_stats\)|size_t \1|' \
32 razorqt-panel/plugin-networkmonitor/razornetworkmonitor.cpp
33 cmake -DCMAKE_INSTALL_PREFIX=/usr .
34 make && make install
36 # save space (png -> jpg)
37 cd $install/usr/share/razor/themes/light
38 convert ./simple_blue_widescreen.png ./simple_blue_widescreen.jpg
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 # copy all, then remove unneeded
45 cp -a $install/* $fs
47 # Dev-files --> razorqt-dev
48 rm -rf $fs/usr/include
49 rm -rf $fs/usr/lib/pkgconfig
51 # Language-files --> razorqt-locale-*
52 find $fs -name '*.qm' -delete
54 # Appswitcher --> razorqt-appswitcher
55 rm -f $fs/usr/bin/razor-appswitcher
56 rm -f $fs/etc/xdg/autostart/razor-appswitcher.desktop
58 # Autosuspend --> razorqt-autosuspend
59 rm -f $fs/usr/bin/razor-autosuspend
60 rm -f $fs/usr/bin/razor-config-autosuspend
61 rm -f $fs/etc/xdg/autostart/razor-autosuspend.desktop
62 rm -f $fs/usr/share/applications/razor-config-autosuspend.desktop
64 # Policykit-agent --> razorqt-policykit-agent
65 rm -f $fs/usr/bin/razor-policykit-agent
66 rm -f $fs/etc/xdg/autostart/razor-policykit-agent.desktop
68 # Power --> razorqt-power
69 rm -f $fs/usr/bin/razor-power
70 rm -f $fs/usr/share/applications/razor-power.desktop
72 # Runner --> razorqt-runner
73 rm -f $fs/usr/bin/razor-runner
74 rm -f $fs/etc/xdg/autostart/razor-runner.desktop
76 # Themes (all but light) --> razorqt-themes
77 find $fs/usr/share/razor/themes -maxdepth 1 -mindepth 1 -type d \
78 \( ! -name light \) -exec rm -rf \{\} \;
79 rm -f $fs/usr/share/razor/themes/light/simple_blue_widescreen.png
80 rm -f $fs/usr/share/razor/themes/light/96640-simple_blue_widescreen.svg
81 sed 's|png|jpg|' -i $fs/usr/share/razor/themes/light/wallpaper.cfg
83 # Remove confupdate (Port desktop.conf syntax from 0.4.x to 0.5.0 format)
84 rm -f $fs/usr/bin/razor-confupdate
85 rm -rf $fs/usr/lib/razor-confupdate_bin
86 rm -rf $fs/usr/share/razor/razor-confupdate
88 # Remove heavy graphics
89 rm -f $fs/usr/share/razor/graphics/rqt*
91 # Remove file - not use KDM
92 rm -rf $fs/usr/share/apps
94 # Remove empty folders
95 for dir in $(find $fs/usr/share -type d); do
96 rmdir --ignore-fail-on-non-empty $dir
97 done
99 # Custom SliTaz integration
100 cp -a $stuff/*.conf $fs/etc/xdg/razor
101 }
103 post_install()
104 {
105 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
106 # Adding WM to SLIM available sessions.
107 if ! echo "$res" | grep -q $PACKAGE; then
108 echo
109 echo -n "Adding $PACKAGE to /etc/slim.conf..."
110 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" "$1/etc/slim.conf"
111 status
112 fi
113 true
114 }
116 post_remove()
117 {
118 # Remove WM from SLIM available sessions.
119 if grep -q $PACKAGE "$1/etc/slim.conf"; then
120 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
121 fi
122 }