Contents of /smage/branches/alx-0_6_0/core/slim/slim-1.3.2-r4.smage2
Parent Directory | Revision Log
Revision 2535 -
(show annotations)
(download)
Fri Jul 1 15:52:28 2011 UTC (13 years, 2 months ago) by niro
File size: 2980 byte(s)
Fri Jul 1 15:52:28 2011 UTC (13 years, 2 months ago) by niro
File size: 2980 byte(s)
-add a custom theme for alx
1 | # $Id$ |
2 | |
3 | PNAME="slim" |
4 | PVER="1.3.2" |
5 | PBUILD="r4" |
6 | |
7 | PCATEGORIE="x11-misc" |
8 | |
9 | DESCRIPTION="SLiM is a Desktop-independent graphical login manager for X11." |
10 | HOMEPAGE="http://slim.berlios.de/" |
11 | |
12 | DEPEND=">= virtual/x11 |
13 | >= media-libs/libpng-1.5 |
14 | >= media-libs/libjpeg-8" |
15 | |
16 | SDEPEND=">= dev-util/pkgconfig-0.25 |
17 | >= virtual/sed" |
18 | |
19 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
20 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
21 | |
22 | REMOVE_DEPRECATED_MAGE_TARGETS=1 |
23 | ALX_ONLY_KEEP="etc/slim.conf etc/rc.d/init.d/slim usr/bin/slim usr/share/slim/themes/default" |
24 | sminclude mtools alx-split |
25 | |
26 | SRC_URI=( |
27 | http://download.berlios.de/${PNAME}/${SRCFILE} |
28 | mirror://${PNAME}/${SRCFILE} |
29 | mirror://${PNAME}/${PNAME}-${PVER}-restart-xserver-if-killed.patch |
30 | mirror://${PNAME}/${PNAME}-${PVER}-fix-keyboard-in-tty-from-which-slim-is-lauched.patch |
31 | mirror://${PNAME}/${PNAME}-${PVER}-fix-SIGTERM-freeze.patch |
32 | mirror://${PNAME}/${PNAME}-${PVER}-libpng15.patch |
33 | ) |
34 | |
35 | UP2DATE="updatecmd_berlios ${PNAME}" |
36 | |
37 | src_prepare() |
38 | { |
39 | munpack ${SRCFILE} || die |
40 | cd ${SRCDIR} |
41 | |
42 | # restart the xserver |
43 | mpatch ${PNAME}-${PVER}-restart-xserver-if-killed.patch || die |
44 | |
45 | # fix keyboard issues |
46 | mpatch ${PNAME}-${PVER}-fix-keyboard-in-tty-from-which-slim-is-lauched.patch || die |
47 | |
48 | # fix a sigterm segfault |
49 | mpatch ${PNAME}-${PVER}-fix-SIGTERM-freeze.patch || die |
50 | |
51 | # fix build against libpng-1.5.x |
52 | mpatch ${PNAME}-${PVER}-libpng15.patch || die |
53 | |
54 | # fix cflags and ldflags |
55 | sed -i \ |
56 | -e "s:^\(CFLAGS=\).*:\1-I. $(pkg-config --cflags freetype2 libpng x11):" \ |
57 | -e "s:^\(LDFLAGS=\).*:\1$(pkg-config --libs xft freetype2 libpng xmu) -ljpeg -lz -lm -lcrypt -lrt:" \ |
58 | -e "s:^\(MANDIR=\).*:\1/usr/share/man:" \ |
59 | Makefile || die |
60 | |
61 | # rename sim.lock to sim.pid and enable daemon mode by default |
62 | # fix the shutdown and reboot commands to match busybox |
63 | # secure x11 with -nolisten tcp |
64 | sed -i -e "s:/var/run/slim.lock:/var/run/slim.pid:" \ |
65 | -e "s:# daemon.*:daemon\tyes:" \ |
66 | -e "s:^\(halt_cmd.*\):\1\t/sbin/halt:" \ |
67 | -e "s:^\(reboot_cmd.*\):\1\t/sbin/reboot:" \ |
68 | -e "s:# xserver_arguments.*:xserver_arguments\t-nolisten tcp:" \ |
69 | slim.conf || die |
70 | } |
71 | |
72 | src_compile() |
73 | { |
74 | cd ${SRCDIR} |
75 | mmake || die |
76 | } |
77 | |
78 | alx_generic_src_install() |
79 | { |
80 | cd ${SRCDIR} |
81 | mmake DESTDIR=${BINDIR} install || die |
82 | |
83 | # install a custom slim.conf |
84 | echo -e ${COLGREEN}" injecting custom slim-configs"${COLDEFAULT} |
85 | mcinjectfile slim.conf /etc || die |
86 | minstalldir /etc/rc.d/init.d || die |
87 | mcinjectexec slim.rc /etc/rc.d/init.d/slim || die |
88 | mcinjectfile alx-slim.theme /usr/share/slim/themes/default/slim.theme || die |
89 | mcinjectfile alx-panel.png /usr/share/slim/themes/default/panel.png || die |
90 | mcinjectfile alx-thinclient-wallpaper.png /usr/share/slim/themes/default/background.png || die |
91 | if [ -f ${BINDIR}/usr/share/slim/themes/default/background.jpg ] |
92 | then |
93 | rm ${BINDIR}/usr/share/slim/themes/default/background.jpg || die |
94 | fi |
95 | } |
96 | |
97 | preinstall() |
98 | { |
99 | add_conf_prot_mask /etc/slim.conf /etc/rc.d/init.d |
100 | } |
101 | |
102 | postinstall() |
103 | { |
104 | mstartservice slim |
105 | alx-split_postinstall |
106 | } |
107 | |
108 | postremove() |
109 | { |
110 | mstopservice slim |
111 | } |