Magellan Linux

Annotation of /smage/trunk/core/slim/slim-1.3.2-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1655 - (hide annotations) (download)
Thu Mar 10 21:16:46 2011 UTC (13 years, 2 months ago) by niro
File size: 2984 byte(s)
auto added: ver bump to 1.3.2-r3
1 niro 1655 # $Id$
2    
3     PNAME="slim"
4     PVER="1.3.2"
5     PBUILD="r3"
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=">= x11-libs/libXmu-1.1
14     >= x11-libs/libX11-1.4
15     >= x11-libs/libXpm-3.9
16     >= x11-libs/libXft-2.2
17     >= media-libs/libpng-1.5
18     >= media-libs/libjpeg-8
19     >= x11-apps/xauth-1.0.5"
20    
21     SDEPEND=">= dev-util/pkgconfig-0.25
22     >= x11-proto/xproto-7.0.20
23     >= virtual/sed"
24    
25     SRCFILE="${PNAME}-${PVER}.tar.gz"
26     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
27    
28     MCORE_ONLY_KEEP="etc/slim.conf etc/rc.d/init.d/slim usr/bin/slim usr/share/slim/themes/default"
29     sminclude mtools mcore-split
30    
31     SRC_URI=(
32     http://download.berlios.de/${PNAME}/${SRCFILE}
33     mirror://${PNAME}/${SRCFILE}
34     mirror://${PNAME}/${PNAME}-${PVER}-restart-xserver-if-killed.patch
35     mirror://${PNAME}/${PNAME}-${PVER}-fix-keyboard-in-tty-from-which-slim-is-lauched.patch
36     mirror://${PNAME}/${PNAME}-${PVER}-fix-SIGTERM-freeze.patch
37     mirror://${PNAME}/${PNAME}-${PVER}-libpng15.patch
38     )
39    
40     UP2DATE="updatecmd_berlios ${PNAME}"
41    
42     src_prepare()
43     {
44     munpack ${SRCFILE} || die
45     cd ${SRCDIR}
46    
47     # restart the xserver
48     mpatch ${PNAME}-${PVER}-restart-xserver-if-killed.patch || die
49    
50     # fix keyboard issues
51     mpatch ${PNAME}-${PVER}-fix-keyboard-in-tty-from-which-slim-is-lauched.patch || die
52    
53     # fix a sigterm segfault
54     mpatch ${PNAME}-${PVER}-fix-SIGTERM-freeze.patch || die
55    
56     # fix build against libpng-1.5.x
57     mpatch ${PNAME}-${PVER}-libpng15.patch || die
58    
59     # fix cflags and ldflags
60     sed -i \
61     -e "s:^\(CFLAGS=\).*:\1-I. $(pkg-config --cflags freetype2 libpng x11):" \
62     -e "s:^\(LDFLAGS=\).*:\1$(pkg-config --libs xft freetype2 libpng xmu) -ljpeg -lz -lm -lcrypt -lrt:" \
63     -e "s:^\(MANDIR=\).*:\1/usr/share/man:" \
64     Makefile || die
65    
66     # rename sim.lock to sim.pid and enable daemon mode by default
67     # fix the shutdown and reboot commands to match busybox
68     # secure x11 with -nolisten tcp
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:" \
74     slim.conf || die
75     }
76    
77     src_compile()
78     {
79     cd ${SRCDIR}
80     mmake || die
81     }
82    
83     mcore_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 slim.theme /usr/share/slim/themes/default/slim.theme || die
94     mcinjectfile panel.png /usr/share/slim/themes/default/panel.png || die
95     mcinjectfile mcore2.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     postinstall()
103     {
104     mstartservice slim
105     }
106    
107     postremove()
108     {
109     mstopservice slim
110     }