wok-current view razorqt/receipt @ rev 24184
updated perl-class-singleton (1.5 -> 1.6)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Dec 31 14:00:12 2021 +0100 (2021-12-31) |
parents | c5bb6b8ba595 |
children | ac8ca9758df1 |
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 current_version()
24 {
25 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
26 sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q'
27 }
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 sed -i 's|sg_init()|sg_init(1)|' \
33 razorqt-panel/plugin-networkmonitor/razornetworkmonitor.cpp \
34 razorqt-panel/plugin-cpuload/razorcpuload.cpp
35 sed -i 's|sg_get_cpu_percents()|sg_get_cpu_percents(NULL)|' \
36 razorqt-panel/plugin-cpuload/razorcpuload.cpp
37 sed -i 's|int \(.*num_network_stats\)|size_t \1|' \
38 razorqt-panel/plugin-networkmonitor/razornetworkmonitor.cpp
39 cmake -DCMAKE_INSTALL_PREFIX=/usr .
40 make && make install
42 # save space (png -> jpg)
43 cd $install/usr/share/razor/themes/light
44 convert ./simple_blue_widescreen.png ./simple_blue_widescreen.jpg
45 }
47 # Rules to gen a SliTaz package suitable for Tazpkg.
48 genpkg_rules()
49 {
50 # copy all, then remove unneeded
51 cp -a $install/* $fs
53 # Dev-files --> razorqt-dev
54 rm -rf $fs/usr/include
55 rm -rf $fs/usr/lib/pkgconfig
57 # Language-files --> razorqt-locale-*
58 find $fs -name '*.qm' -delete
60 # Appswitcher --> razorqt-appswitcher
61 rm -f $fs/usr/bin/razor-appswitcher
62 rm -f $fs/etc/xdg/autostart/razor-appswitcher.desktop
64 # Autosuspend --> razorqt-autosuspend
65 rm -f $fs/usr/bin/razor-autosuspend
66 rm -f $fs/usr/bin/razor-config-autosuspend
67 rm -f $fs/etc/xdg/autostart/razor-autosuspend.desktop
68 rm -f $fs/usr/share/applications/razor-config-autosuspend.desktop
70 # Policykit-agent --> razorqt-policykit-agent
71 rm -f $fs/usr/bin/razor-policykit-agent
72 rm -f $fs/etc/xdg/autostart/razor-policykit-agent.desktop
74 # Power --> razorqt-power
75 rm -f $fs/usr/bin/razor-power
76 rm -f $fs/usr/share/applications/razor-power.desktop
78 # Runner --> razorqt-runner
79 rm -f $fs/usr/bin/razor-runner
80 rm -f $fs/etc/xdg/autostart/razor-runner.desktop
82 # Themes (all but light) --> razorqt-themes
83 find $fs/usr/share/razor/themes -maxdepth 1 -mindepth 1 -type d \
84 \( ! -name light \) -exec rm -rf \{\} \;
85 rm -f $fs/usr/share/razor/themes/light/simple_blue_widescreen.png
86 rm -f $fs/usr/share/razor/themes/light/96640-simple_blue_widescreen.svg
87 sed 's|png|jpg|' -i $fs/usr/share/razor/themes/light/wallpaper.cfg
89 # Remove confupdate (Port desktop.conf syntax from 0.4.x to 0.5.0 format)
90 rm -f $fs/usr/bin/razor-confupdate
91 rm -rf $fs/usr/lib/razor-confupdate_bin
92 rm -rf $fs/usr/share/razor/razor-confupdate
94 # Remove heavy graphics
95 rm -f $fs/usr/share/razor/graphics/rqt*
97 # Remove file - not use KDM
98 rm -rf $fs/usr/share/apps
100 # Remove empty folders
101 for dir in $(find $fs/usr/share -type d); do
102 rmdir --ignore-fail-on-non-empty $dir
103 done
105 # Custom SliTaz integration
106 cp -a $stuff/*.conf $fs/etc/xdg/razor
107 }
109 post_install()
110 {
111 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
112 # Adding WM to SLIM available sessions.
113 if ! echo "$res" | grep -q $PACKAGE; then
114 echo
115 echo -n "Adding $PACKAGE to /etc/slim.conf..."
116 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" "$1/etc/slim.conf"
117 status
118 fi
119 true
120 }
122 post_remove()
123 {
124 # Remove WM from SLIM available sessions.
125 if grep -q $PACKAGE "$1/etc/slim.conf"; then
126 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
127 fi
128 }