Magellan Linux

Contents of /trunk/extras/slim/slim-1.3.4-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13168 - (show annotations) (download)
Thu Aug 30 13:10:24 2012 UTC (11 years, 9 months ago) by niro
File size: 2530 byte(s)
-added patch to fix build against libpng-1.5
1 # $Id$
2
3 PNAME="slim"
4 PVER="1.3.4"
5 PBUILD="r1"
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/pam-1.1
19 >= sys-libs/libstdc++-4.6"
20
21 SDEPEND=">= dev-util/pkgconfig-0.25
22 >= x11-proto/xproto-7
23 >= sys-apps/sed-4"
24
25 SRCFILE="${PNAME}-${PVER}.tar.gz"
26 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
27
28 TMPFILES_REV=1.2
29
30 sminclude mtools cmake
31
32 SRC_URI=(
33 http://download.berlios.de/${PNAME}/${SRCFILE}
34 mirror://${PNAME}/${SRCFILE}
35 mirror://${PNAME}/${PNAME}-${PVER}-libpng15.patch
36 mirror://${PNAME}/slim.service
37 mirror://${PNAME}/slim.tmpfiles-${TMPFILES_REV}
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 # fix build against libpng-1.5.x
53 mpatch ${PNAME}-${PVER}-libpng15.patch || die
54
55 # rename sim.lock to sim.pid and enable daemon mode by default
56 # fix the shutdown and reboot commands to match busybox
57 # secure x11 with -nolisten tcp
58 # and usr /run instead of /var/run
59 sed -i -e "s:/var/run/slim.lock:/run/slim.pid:" \
60 -e "s:/var/run/slim.auth:/run/slim.auth:" \
61 -e "s:# daemon.*:daemon\tyes:" \
62 -e "s:^\(halt_cmd.*\):\1\t/sbin/halt:" \
63 -e "s:^\(reboot_cmd.*\):\1\t/sbin/reboot:" \
64 -e "s:#xserver_arguments.*:xserver_arguments\t-nolisten tcp vt07:" \
65 slim.conf || die
66 }
67
68 src_compile()
69 {
70 cd ${SRCDIR}
71 cmake_configure $(cmake_opt USE_PAM yes) || die
72 mmake || die
73 }
74
75 src_install()
76 {
77 cd ${SRCDIR}
78 mmake DESTDIR=${BINDIR} install || die
79
80 minstallunit slim.service slim@.service || die
81 minstalltmp slim.tmpfiles-${TMPFILES_REV} slim.conf || die
82 minstallpam slim.pamd slim || die
83 minstalllog slim.logrotate slim || die
84
85 # theme
86 minstallfile -s magellan-slim.theme /usr/share/slim/themes/default/slim.theme || die
87 minstallfile -s magellan-panel.png /usr/share/slim/themes/default/panel.png || die
88 minstallfile -s magellan-wallpaper.png /usr/share/slim/themes/default/background.png || die
89 if [ -f ${BINDIR}/usr/share/slim/themes/default/background.jpg ]
90 then
91 rm ${BINDIR}/usr/share/slim/themes/default/background.jpg || die
92 fi
93 }
94
95 postinstall()
96 {
97 mstartunit slim@.service slim
98 }
99
100 postremove()
101 {
102 mstopunit slim@.service slim
103 }