Magellan Linux

Contents of /branches/magellan-next/extras/slim/slim-1.3.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9286 - (show annotations) (download)
Thu Nov 24 20:30:42 2011 UTC (12 years, 6 months ago) by niro
File size: 3101 byte(s)
-download missing files
1 # $Id$
2
3 PNAME="slim"
4 PVER="1.3.2"
5 PBUILD="r1"
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=">= 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/pam-1.1"
19
20 SDEPEND=">= dev-util/pkgconfig-0.25
21 >= x11-proto/xproto-7
22 >= sys-apps/sed-4"
23
24 SRCFILE="${PNAME}-${PVER}.tar.gz"
25 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
26
27 sminclude mtools
28
29 SRC_URI=(
30 http://download.berlios.de/${PNAME}/${SRCFILE}
31 mirror://${PNAME}/${SRCFILE}
32 mirror://${PNAME}/${PNAME}-${PVER}-restart-xserver-if-killed.patch
33 mirror://${PNAME}/${PNAME}-${PVER}-fix-keyboard-in-tty-from-which-slim-is-lauched.patch
34 mirror://${PNAME}/${PNAME}-${PVER}-fix-SIGTERM-freeze.patch
35 mirror://${PNAME}/${PNAME}-${PVER}-libpng15.patch
36 mirror://${PNAME}/slim.service
37 mirror://${PNAME}/slim.tmpfiles
38 mirror://${PNAME}/slim.logrotate
39 mirror://${PNAME}/slim.pamd
40 mirror://${PNAME}/magellan-slim.theme
41 mirror://${PNAME}/magellan-panel.png
42 mirror://${PNAME}/magellan-wallpaper.png
43 )
44
45 UP2DATE="updatecmd_berlios ${PNAME}"
46
47 src_prepare()
48 {
49 munpack ${SRCFILE} || die
50 cd ${SRCDIR}
51
52 # restart the xserver
53 mpatch ${PNAME}-${PVER}-restart-xserver-if-killed.patch || die
54
55 # fix keyboard issues
56 mpatch ${PNAME}-${PVER}-fix-keyboard-in-tty-from-which-slim-is-lauched.patch || die
57
58 # fix a sigterm segfault
59 mpatch ${PNAME}-${PVER}-fix-SIGTERM-freeze.patch || die
60
61 # fix build against libpng-1.5.x
62 mpatch ${PNAME}-${PVER}-libpng15.patch || die
63
64 # fix cflags and ldflags
65 sed -i \
66 -e "s:^\(CFLAGS=\).*:\1-I. $(pkg-config --cflags freetype2 libpng x11):" \
67 -e "s:^\(LDFLAGS=\).*:\1$(pkg-config --libs xft freetype2 libpng xmu) -ljpeg -lz -lm -lcrypt -lrt:" \
68 -e "s:^\(MANDIR=\).*:\1/usr/share/man:" \
69 Makefile || die
70
71 # rename sim.lock to sim.pid and enable daemon mode by default
72 # fix the shutdown and reboot commands to match busybox
73 # secure x11 with -nolisten tcp
74 sed -i -e "s:/var/run/slim.lock:/var/run/slim.pid:" \
75 -e "s:# daemon.*:daemon\tyes:" \
76 -e "s:^\(halt_cmd.*\):\1\t/sbin/halt:" \
77 -e "s:^\(reboot_cmd.*\):\1\t/sbin/reboot:" \
78 -e "s:# xserver_arguments.*:xserver_arguments\t-nolisten tcp:" \
79 slim.conf || die
80 }
81
82 src_compile()
83 {
84 cd ${SRCDIR}
85 mmake || die
86 }
87
88 src_install()
89 {
90 cd ${SRCDIR}
91 mmake DESTDIR=${BINDIR} install || die
92
93 minstallunit slim.service slim@.service || die
94 minstalltmp slim.tmpfiles slim.conf || die
95 minstallpam slim.pamd slim || die
96 minstalllog slim.logrotate slim || die
97
98 # theme
99 minstallfile -s magellan-slim.theme /usr/share/slim/themes/default/slim.theme || die
100 minstallfile -s magellan-panel.png /usr/share/slim/themes/default/panel.png || die
101 minstallfile -s magellan-wallpaper.png /usr/share/slim/themes/default/background.png || die
102 if [ -f ${BINDIR}/usr/share/slim/themes/default/background.jpg ]
103 then
104 rm ${BINDIR}/usr/share/slim/themes/default/background.jpg || die
105 fi
106 }
107
108 postinstall()
109 {
110 mstartunit slim@.service slim
111 }
112
113 postremove()
114 {
115 mstopunit slim@.service slim
116 }