Contents of /smage/trunk/core/slim/slim-1.3.6-r1.smage2
Parent Directory | Revision Log
Revision 5303 -
(show annotations)
(download)
Thu Dec 19 09:01:27 2013 UTC (10 years, 6 months ago) by niro
File size: 3355 byte(s)
Thu Dec 19 09:01:27 2013 UTC (10 years, 6 months ago) by niro
File size: 3355 byte(s)
-fixed build without pam enabled
1 | # $Id$ |
2 | |
3 | PNAME="slim" |
4 | PVER="1.3.6" |
5 | PBUILD="r1" |
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/libstdc++-4.8" |
19 | |
20 | SDEPEND=">= dev-util/pkgconfig-0.25 |
21 | >= x11-proto/xproto-7 |
22 | >= virtual/sed" |
23 | |
24 | PROVIDE="virtual/graphical-login" |
25 | |
26 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
27 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
28 | |
29 | ALX_PKG_KEEP="etc/slim.conf |
30 | usr/bin/slim |
31 | usr/lib/systemd |
32 | usr/share/slim/themes/default" |
33 | sminclude mtools cmake systemd alx-split |
34 | |
35 | SVC_REV=1.4 |
36 | TMPFILES_REV=1.2 |
37 | |
38 | SRC_URI=( |
39 | http://download.berlios.de/${PNAME}/${SRCFILE} |
40 | mirror://${PNAME}/${SRCFILE} |
41 | mirror://${PNAME}/slim.service-${SVC_REV} |
42 | mirror://${PNAME}/slim.tmpfiles-${TMPFILES_REV} |
43 | mirror://${PNAME}/${PNAME}-${PVER}-add-sessiondir.patch |
44 | mirror://${PNAME}/${PNAME}-${PVER}-fix-libslim-libraries.patch |
45 | mirror://${PNAME}/${PNAME}-${PVER}-only-build-slimlock-with-pam.patch |
46 | ) |
47 | |
48 | UP2DATE="updatecmd_berlios ${PNAME}" |
49 | |
50 | src_prepare() |
51 | { |
52 | munpack ${SRCFILE} || die |
53 | cd ${SRCDIR} |
54 | |
55 | # fix linking |
56 | mpatch ${PNAME}-${PVER}-fix-libslim-libraries.patch || die |
57 | # enable the new session dir support |
58 | mpatch ${PNAME}-${PVER}-add-sessiondir.patch || die |
59 | # fix build without pam enabled |
60 | mpatch ${PNAME}-${PVER}-only-build-slimlock-with-pam.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 | # alx: enable autologin for user station |
81 | sed -i -e "s:# default_user.*:default_user station:" \ |
82 | -e "s:# auto_login.*:auto_login yes:" \ |
83 | slim.conf || die |
84 | } |
85 | |
86 | src_compile() |
87 | { |
88 | cd ${SRCDIR} |
89 | cmake_configure $(cmake_opt USE_PAM no) $(cmake_opt USE_CONSOLEKIT no) || die |
90 | mmake || die |
91 | } |
92 | |
93 | alx_generic_src_install() |
94 | { |
95 | cd ${SRCDIR} |
96 | mmake DESTDIR=${BINDIR} install || die |
97 | |
98 | minstallunit slim.service-${SVC_REV} slim.service || die |
99 | minstalltmp slim.tmpfiles-${TMPFILES_REV} slim.conf || die |
100 | |
101 | # install a custom slim.conf |
102 | echo -e ${COLGREEN}" injecting custom slim-configs"${COLDEFAULT} |
103 | mcinjectfile alx-slim.theme /usr/share/slim/themes/default/slim.theme || die |
104 | mcinjectfile alx-panel.png /usr/share/slim/themes/default/panel.png || die |
105 | mcinjectfile alx-thinclient-wallpaper.png /usr/share/slim/themes/default/background.png || die |
106 | if [ -f ${BINDIR}/usr/share/slim/themes/default/background.jpg ] |
107 | then |
108 | rm ${BINDIR}/usr/share/slim/themes/default/background.jpg || die |
109 | fi |
110 | } |
111 | |
112 | preinstall() |
113 | { |
114 | add_conf_prot_mask /etc/slim.conf /etc/tmpfiles.d |
115 | } |
116 | |
117 | postinstall() |
118 | { |
119 | mstartunit slim.service |
120 | } |
121 | |
122 | postremove() |
123 | { |
124 | mstopunit slim.service |
125 | } |