Magellan Linux

Contents of /trunk/extras/slim/slim-1.3.6-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19739 - (show annotations) (download)
Wed Oct 16 17:50:36 2013 UTC (10 years, 8 months ago) by niro
File size: 3134 byte(s)
-fixed libdir for libslim and fixed hardcoded systemdunitdir
1 # $Id$
2
3 PNAME="slim"
4 PVER="1.3.6"
5 PBUILD="r3"
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.6
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.8"
20
21 SDEPEND=">= dev-util/pkgconfig-0.25
22 >= x11-proto/xproto-7
23 >= virtual/sed"
24
25 PROVIDE="virtual/graphical-login"
26
27 SRCFILE="${PNAME}-${PVER}.tar.gz"
28 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
29
30 SVC_REV=1.4
31 TMPFILES_REV=1.2
32 PAMD_REV=1.3
33
34 sminclude mtools cmake systemd
35
36 SRC_URI=(
37 http://download.berlios.de/${PNAME}/${SRCFILE}
38 mirror://${PNAME}/${SRCFILE}
39 mirror://${PNAME}/slim.service-${SVC_REV}
40 mirror://${PNAME}/slim.tmpfiles-${TMPFILES_REV}
41 mirror://${PNAME}/slim.logrotate
42 mirror://${PNAME}/slim.pamd-${PAMD_REV}
43 mirror://${PNAME}/magellan-slim.theme
44 mirror://${PNAME}/magellan-panel.png
45 mirror://${PNAME}/magellan-wallpaper.png
46 mirror://${PNAME}/${PNAME}-${PVER}-add-sessiondir.patch
47 mirror://${PNAME}/${PNAME}-${PVER}-fix-libslim-libraries.patch
48 )
49
50 UP2DATE="updatecmd_berlios ${PNAME}"
51
52 src_prepare()
53 {
54 munpack ${SRCFILE} || die
55 cd ${SRCDIR}
56
57 # fix linking
58 mpatch ${PNAME}-${PVER}-fix-libslim-libraries.patch || die
59 # enable the new session dir support
60 mpatch ${PNAME}-${PVER}-add-sessiondir.patch || die
61
62 # fix location of systemd services and libslim
63 sed -e "s:set(LIBDIR \"/lib\"):set(LIBDIR \"/usr/$(mlibdir)\"):" \
64 -e "s:slim.service DESTINATION \${LIBDIR}/systemd/system:slim.service DESTINATION $(mget-systemd-unit-dir):" \
65 -i CMakeLists.txt || die
66
67 # rename sim.lock to sim.pid and enable daemon mode by default
68 # fix the shutdown and reboot commands to match busybox
69 # secure x11 with -nolisten tcp
70 # and usr /run instead of /var/run
71 sed -i -e "s:/var/run/slim.lock:/run/slim.pid:" \
72 -e "s:/var/run/slim.auth:/run/slim.auth:" \
73 -e "s:# daemon.*:daemon\tyes:" \
74 -e "s:^\(halt_cmd.*\):\1\t/sbin/halt:" \
75 -e "s:^\(reboot_cmd.*\):\1\t/sbin/reboot:" \
76 -e "s:#xserver_arguments.*:xserver_arguments\t-nolisten tcp vt01:" \
77 slim.conf || die
78 }
79
80 src_compile()
81 {
82 cd ${SRCDIR}
83 cmake_configure $(cmake_opt USE_PAM yes) $(cmake_opt USE_CONSOLEKIT no) || die
84 mmake || die
85 }
86
87 src_install()
88 {
89 cd ${SRCDIR}
90 mmake DESTDIR=${BINDIR} install || die
91
92 # we use our own service file to honor plymouth and tty1 X11
93 minstallunit slim.service-${SVC_REV} slim.service || die
94 minstalltmp slim.tmpfiles-${TMPFILES_REV} slim.conf || die
95 minstallpam slim.pamd-${PAMD_REV} 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
111 }
112
113 postremove()
114 {
115 mstopunit slim.service
116 }