Magellan Linux

Contents of /branches/R11-stable/extras/slim/slim-1.3.6-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 20207 - (show annotations) (download)
Tue Nov 26 11:46:47 2013 UTC (10 years, 5 months ago) by niro
File size: 3143 byte(s)
-release branches/R11-stable
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 -i -e 's:set(LIBDIR "/lib"):set(LIBDIR "/usr/lib"):' \
64 -e "s:LIBRARY DESTINATION lib:LIBRARY DESTINATION $(mlibdir):" \
65 -e "s:ARCHIVE DESTINATION lib:ARCHIVE DESTINATION $(mlibdir):" \
66 CMakeLists.txt || die
67
68 # rename sim.lock to sim.pid and enable daemon mode by default
69 # fix the shutdown and reboot commands to match busybox
70 # secure x11 with -nolisten tcp
71 # and usr /run instead of /var/run
72 sed -i -e "s:/var/run/slim.lock:/run/slim.pid:" \
73 -e "s:/var/run/slim.auth:/run/slim.auth:" \
74 -e "s:# daemon.*:daemon\tyes:" \
75 -e "s:^\(halt_cmd.*\):\1\t/sbin/halt:" \
76 -e "s:^\(reboot_cmd.*\):\1\t/sbin/reboot:" \
77 -e "s:#xserver_arguments.*:xserver_arguments\t-nolisten tcp vt01:" \
78 slim.conf || die
79 }
80
81 src_compile()
82 {
83 cd ${SRCDIR}
84 cmake_configure $(cmake_opt USE_PAM yes) $(cmake_opt USE_CONSOLEKIT no) || die
85 mmake || die
86 }
87
88 src_install()
89 {
90 cd ${SRCDIR}
91 mmake DESTDIR=${BINDIR} install || die
92
93 # we use our own service file to honor plymouth and tty1 X11
94 minstallunit slim.service-${SVC_REV} slim.service || die
95 minstalltmp slim.tmpfiles-${TMPFILES_REV} slim.conf || die
96 minstallpam slim.pamd-${PAMD_REV} slim || die
97 minstalllog slim.logrotate slim || die
98
99 # theme
100 minstallfile -s magellan-slim.theme /usr/share/slim/themes/default/slim.theme || die
101 minstallfile -s magellan-panel.png /usr/share/slim/themes/default/panel.png || die
102 minstallfile -s magellan-wallpaper.png /usr/share/slim/themes/default/background.png || die
103 if [ -f ${BINDIR}/usr/share/slim/themes/default/background.jpg ]
104 then
105 rm ${BINDIR}/usr/share/slim/themes/default/background.jpg || die
106 fi
107 }
108
109 postinstall()
110 {
111 mstartunit slim.service
112 }
113
114 postremove()
115 {
116 mstopunit slim.service
117 }