Magellan Linux

Annotation of /branches/magellan-next/extras/slim/slim-1.3.2-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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