Magellan Linux

Contents of /smage/trunk/core/slim/slim-1.3.2-r7.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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