Contents of /branches/R11-stable/extras/slim/slim-1.3.6-r4.smage2
Parent Directory | Revision Log
Revision 21853 -
(show annotations)
(download)
Mon Jul 21 10:00:02 2014 UTC (10 years, 2 months ago) by niro
File size: 3342 byte(s)
Mon Jul 21 10:00:02 2014 UTC (10 years, 2 months ago) by niro
File size: 3342 byte(s)
-release branches/R11-stable
1 | # $Id$ |
2 | |
3 | PNAME="slim" |
4 | PVER="1.3.6" |
5 | PBUILD="r4" |
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 | >= app-crypt/libgcrypt-1.6" |
21 | |
22 | SDEPEND=">= dev-util/pkgconfig-0.25 |
23 | >= x11-proto/xproto-7 |
24 | >= virtual/sed" |
25 | |
26 | PROVIDE="virtual/graphical-login" |
27 | |
28 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
29 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
30 | |
31 | SVC_REV=1.4 |
32 | TMPFILES_REV=1.2 |
33 | PAMD_REV=1.3 |
34 | |
35 | sminclude mtools cmake systemd |
36 | |
37 | SRC_URI=( |
38 | http://download.berlios.de/${PNAME}/${SRCFILE} |
39 | mirror://${PNAME}/${SRCFILE} |
40 | mirror://${PNAME}/slim.service-${SVC_REV} |
41 | mirror://${PNAME}/slim.tmpfiles-${TMPFILES_REV} |
42 | mirror://${PNAME}/slim.logrotate |
43 | mirror://${PNAME}/slim.pamd-${PAMD_REV} |
44 | mirror://${PNAME}/magellan-slim.theme |
45 | mirror://${PNAME}/magellan-panel.png |
46 | mirror://${PNAME}/magellan-wallpaper.png |
47 | mirror://${PNAME}/${PNAME}-${PVER}-add-sessiondir.patch |
48 | mirror://${PNAME}/${PNAME}-${PVER}-fix-libslim-libraries.patch |
49 | mirror://${PNAME}/${PNAME}-${PVER}-only-build-slimlock-with-pam.patch |
50 | ) |
51 | |
52 | UP2DATE="updatecmd_berlios ${PNAME}" |
53 | |
54 | src_prepare() |
55 | { |
56 | munpack ${SRCFILE} || die |
57 | cd ${SRCDIR} |
58 | |
59 | # fix linking |
60 | mpatch ${PNAME}-${PVER}-fix-libslim-libraries.patch || die |
61 | # enable the new session dir support |
62 | mpatch ${PNAME}-${PVER}-add-sessiondir.patch || die |
63 | # fix build without pam enabled |
64 | mpatch ${PNAME}-${PVER}-only-build-slimlock-with-pam.patch || die |
65 | |
66 | # fix location of systemd services and libslim |
67 | sed -i -e 's:set(LIBDIR "/lib"):set(LIBDIR "/usr/lib"):' \ |
68 | -e "s:LIBRARY DESTINATION lib:LIBRARY DESTINATION $(mlibdir):" \ |
69 | -e "s:ARCHIVE DESTINATION lib:ARCHIVE DESTINATION $(mlibdir):" \ |
70 | CMakeLists.txt || die |
71 | |
72 | # rename sim.lock to sim.pid and enable daemon mode by default |
73 | # fix the shutdown and reboot commands to match busybox |
74 | # secure x11 with -nolisten tcp |
75 | # and usr /run instead of /var/run |
76 | sed -i -e "s:/var/run/slim.lock:/run/slim.pid:" \ |
77 | -e "s:/var/run/slim.auth:/run/slim.auth:" \ |
78 | -e "s:# daemon.*:daemon\tyes:" \ |
79 | -e "s:^\(halt_cmd.*\):\1\t/sbin/halt:" \ |
80 | -e "s:^\(reboot_cmd.*\):\1\t/sbin/reboot:" \ |
81 | -e "s:#xserver_arguments.*:xserver_arguments\t-nolisten tcp vt01:" \ |
82 | slim.conf || die |
83 | } |
84 | |
85 | src_compile() |
86 | { |
87 | cd ${SRCDIR} |
88 | cmake_configure $(cmake_opt USE_PAM yes) $(cmake_opt USE_CONSOLEKIT no) || die |
89 | mmake || die |
90 | } |
91 | |
92 | src_install() |
93 | { |
94 | cd ${SRCDIR} |
95 | mmake DESTDIR=${BINDIR} install || die |
96 | |
97 | # we use our own service file to honor plymouth and tty1 X11 |
98 | minstallunit slim.service-${SVC_REV} slim.service || die |
99 | minstalltmp slim.tmpfiles-${TMPFILES_REV} slim.conf || die |
100 | minstallpam slim.pamd-${PAMD_REV} 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 |
116 | } |
117 | |
118 | postremove() |
119 | { |
120 | mstopunit slim.service |
121 | } |