Contents of /smage/branches/alx-0_6_0/core/slim/slim-1.3.2-r6.smage2
Parent Directory | Revision Log
Revision 3388 -
(show annotations)
(download)
Wed Mar 28 14:56:48 2012 UTC (12 years, 6 months ago) by niro
File size: 3012 byte(s)
Wed Mar 28 14:56:48 2012 UTC (12 years, 6 months ago) by niro
File size: 3012 byte(s)
-alx uses vt03 for X
1 | # $Id$ |
2 | |
3 | PNAME="slim" |
4 | PVER="1.3.2" |
5 | PBUILD="r6" |
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 | # alx uses vt03 *not* vt07 |
65 | sed -i -e "s:/var/run/slim.lock:/var/run/slim.pid:" \ |
66 | -e "s:# daemon.*:daemon\tyes:" \ |
67 | -e "s:^\(halt_cmd.*\):\1\t/sbin/halt:" \ |
68 | -e "s:^\(reboot_cmd.*\):\1\t/sbin/reboot:" \ |
69 | -e "s:#xserver_arguments.*:xserver_arguments\t-nolisten tcp vt03:" \ |
70 | slim.conf || die |
71 | } |
72 | |
73 | src_compile() |
74 | { |
75 | cd ${SRCDIR} |
76 | mmake || die |
77 | } |
78 | |
79 | alx_generic_src_install() |
80 | { |
81 | cd ${SRCDIR} |
82 | mmake DESTDIR=${BINDIR} install || die |
83 | |
84 | # install a custom slim.conf |
85 | echo -e ${COLGREEN}" injecting custom slim-configs"${COLDEFAULT} |
86 | mcinjectfile slim.conf /etc || die |
87 | minstalldir /etc/rc.d/init.d || die |
88 | mcinjectexec slim.rc /etc/rc.d/init.d/slim || die |
89 | mcinjectfile alx-slim.theme /usr/share/slim/themes/default/slim.theme || die |
90 | mcinjectfile alx-panel.png /usr/share/slim/themes/default/panel.png || die |
91 | mcinjectfile alx-thinclient-wallpaper.png /usr/share/slim/themes/default/background.png || die |
92 | if [ -f ${BINDIR}/usr/share/slim/themes/default/background.jpg ] |
93 | then |
94 | rm ${BINDIR}/usr/share/slim/themes/default/background.jpg || die |
95 | fi |
96 | } |
97 | |
98 | preinstall() |
99 | { |
100 | add_conf_prot_mask /etc/slim.conf /etc/rc.d/init.d |
101 | } |
102 | |
103 | postinstall() |
104 | { |
105 | mstartservice slim |
106 | alx-split_postinstall |
107 | } |
108 | |
109 | postremove() |
110 | { |
111 | mstopservice slim |
112 | } |