Contents of /smage/branches/alx-0_6_0/core/slim/slim-1.3.2-r2.smage2
Parent Directory | Revision Log
Revision 2101 -
(show annotations)
(download)
Thu May 12 12:26:05 2011 UTC (13 years, 4 months ago) by niro
File size: 2604 byte(s)
Thu May 12 12:26:05 2011 UTC (13 years, 4 months ago) by niro
File size: 2604 byte(s)
-conf_prot setup
1 | # $Id$ |
2 | |
3 | PNAME="slim" |
4 | PVER="1.3.2" |
5 | PBUILD="r2" |
6 | |
7 | PCATEGORIE="x11-misc" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="SLiM is a Desktop-independent graphical login manager for X11." |
11 | HOMEPAGE="http://slim.berlios.de/" |
12 | |
13 | DEPEND=">= virtual/x11 |
14 | >= media-libs/libpng-1.5 |
15 | >= media-libs/libjpeg-8" |
16 | |
17 | SDEPEND=">= dev-util/pkgconfig-0.25 |
18 | >= virtual/sed" |
19 | |
20 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
21 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
22 | |
23 | REMOVE_DEPRECATED_MAGE_TARGETS=1 |
24 | ALX_ONLY_KEEP="etc/slim.conf etc/rc.d/init.d/slim usr/bin/slim usr/share/slim/themes/default" |
25 | sminclude mtools alx-split |
26 | |
27 | SRC_URI=( |
28 | http://download.berlios.de/${PNAME}/${SRCFILE} |
29 | mirror://${PNAME}/${SRCFILE} |
30 | mirror://${PNAME}/${PNAME}-${PVER}-restart-xserver-if-killed.patch |
31 | mirror://${PNAME}/${PNAME}-${PVER}-fix-keyboard-in-tty-from-which-slim-is-lauched.patch |
32 | mirror://${PNAME}/${PNAME}-${PVER}-fix-SIGTERM-freeze.patch |
33 | mirror://${PNAME}/${PNAME}-${PVER}-libpng15.patch |
34 | ) |
35 | |
36 | UP2DATE="updatecmd_berlios ${PNAME}" |
37 | |
38 | src_prepare() |
39 | { |
40 | munpack ${SRCFILE} || die |
41 | cd ${SRCDIR} |
42 | |
43 | # restart the xserver |
44 | mpatch ${PNAME}-${PVER}-restart-xserver-if-killed.patch || die |
45 | |
46 | # fix keyboard issues |
47 | mpatch ${PNAME}-${PVER}-fix-keyboard-in-tty-from-which-slim-is-lauched.patch || die |
48 | |
49 | # fix a sigterm segfault |
50 | mpatch ${PNAME}-${PVER}-fix-SIGTERM-freeze.patch || die |
51 | |
52 | # fix build against libpng-1.5.x |
53 | mpatch ${PNAME}-${PVER}-libpng15.patch || die |
54 | |
55 | # fix cflags and ldflags |
56 | sed -i \ |
57 | -e "s:^\(CFLAGS=\).*:\1-I. $(pkg-config --cflags freetype2 libpng x11):" \ |
58 | -e "s:^\(LDFLAGS=\).*:\1$(pkg-config --libs xft freetype2 libpng xmu) -ljpeg -lz -lm -lcrypt -lrt:" \ |
59 | -e "s:^\(MANDIR=\).*:\1/usr/share/man:" \ |
60 | Makefile || die |
61 | |
62 | # rename sim.lock to sim.pid and enable daemon mode by default |
63 | # fix the shutdown and reboot commands to match busybox |
64 | # secure x11 with -nolisten tcp |
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:" \ |
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 | } |
90 | |
91 | preinstall() |
92 | { |
93 | add_conf_prot_mask /etc/slim.conf /etc/rc.d/init.d |
94 | } |
95 | |
96 | postinstall() |
97 | { |
98 | mstartservice slim |
99 | alx-split_postinstall |
100 | } |
101 | |
102 | postremove() |
103 | { |
104 | mstopservice slim |
105 | } |