Contents of /smage/trunk/core/slim/slim-1.3.6-r3.smage2
Parent Directory | Revision Log
Revision 5313 -
(show annotations)
(download)
Thu Dec 19 12:40:44 2013 UTC (10 years, 5 months ago) by niro
File size: 3398 byte(s)
Thu Dec 19 12:40:44 2013 UTC (10 years, 5 months ago) by niro
File size: 3398 byte(s)
-fixed autologin
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/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 | etc/tmpfiles.d |
31 | usr/bin/slim |
32 | usr/$(mlibdir)/libslim.so.* |
33 | usr/lib/systemd |
34 | usr/share/slim/themes/default" |
35 | sminclude mtools cmake systemd alx-split |
36 | |
37 | SVC_REV=1.4 |
38 | TMPFILES_REV=1.2 |
39 | |
40 | SRC_URI=( |
41 | http://download.berlios.de/${PNAME}/${SRCFILE} |
42 | mirror://${PNAME}/${SRCFILE} |
43 | mirror://${PNAME}/slim.service-${SVC_REV} |
44 | mirror://${PNAME}/slim.tmpfiles-${TMPFILES_REV} |
45 | mirror://${PNAME}/${PNAME}-${PVER}-add-sessiondir.patch |
46 | mirror://${PNAME}/${PNAME}-${PVER}-fix-libslim-libraries.patch |
47 | mirror://${PNAME}/${PNAME}-${PVER}-only-build-slimlock-with-pam.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 | # fix build without pam enabled |
62 | mpatch ${PNAME}-${PVER}-only-build-slimlock-with-pam.patch || die |
63 | |
64 | # fix location of systemd services and libslim |
65 | sed -i -e 's:set(LIBDIR "/lib"):set(LIBDIR "/usr/lib"):' \ |
66 | -e "s:LIBRARY DESTINATION lib:LIBRARY DESTINATION $(mlibdir):" \ |
67 | -e "s:ARCHIVE DESTINATION lib:ARCHIVE DESTINATION $(mlibdir):" \ |
68 | CMakeLists.txt || die |
69 | |
70 | # rename sim.lock to sim.pid and enable daemon mode by default |
71 | # fix the shutdown and reboot commands to match busybox |
72 | # secure x11 with -nolisten tcp |
73 | # and usr /run instead of /var/run |
74 | sed -i -e "s:/var/run/slim.lock:/run/slim.pid:" \ |
75 | -e "s:/var/run/slim.auth:/run/slim.auth:" \ |
76 | -e "s:# daemon.*:daemon\tyes:" \ |
77 | -e "s:^\(halt_cmd.*\):\1\t/sbin/halt:" \ |
78 | -e "s:^\(reboot_cmd.*\):\1\t/sbin/reboot:" \ |
79 | -e "s:#xserver_arguments.*:xserver_arguments\t-nolisten tcp vt01:" \ |
80 | slim.conf || die |
81 | |
82 | # alx: enable autologin for user station |
83 | sed -i -e "s:#default_user.*:default_user station:" \ |
84 | -e "s:#auto_login.*:auto_login yes:" \ |
85 | slim.conf || die |
86 | } |
87 | |
88 | src_compile() |
89 | { |
90 | cd ${SRCDIR} |
91 | cmake_configure $(cmake_opt USE_PAM no) $(cmake_opt USE_CONSOLEKIT no) || die |
92 | mmake || die |
93 | } |
94 | |
95 | alx_generic_src_install() |
96 | { |
97 | cd ${SRCDIR} |
98 | mmake DESTDIR=${BINDIR} install || die |
99 | |
100 | minstallunit slim.service-${SVC_REV} slim.service || die |
101 | minstalltmp slim.tmpfiles-${TMPFILES_REV} slim.conf || die |
102 | |
103 | # install a custom slim.conf |
104 | echo -e ${COLGREEN}" injecting custom slim-configs"${COLDEFAULT} |
105 | mcinjectfile alx-slim.theme /usr/share/slim/themes/default/slim.theme || die |
106 | mcinjectfile alx-panel.png /usr/share/slim/themes/default/panel.png || die |
107 | mcinjectfile alx-thinclient-wallpaper.png /usr/share/slim/themes/default/background.png || die |
108 | if [ -f ${BINDIR}/usr/share/slim/themes/default/background.jpg ] |
109 | then |
110 | rm ${BINDIR}/usr/share/slim/themes/default/background.jpg || die |
111 | fi |
112 | } |
113 | |
114 | preinstall() |
115 | { |
116 | add_conf_prot_mask /etc/slim.conf /etc/tmpfiles.d |
117 | } |
118 | |
119 | postinstall() |
120 | { |
121 | mstartunit slim.service |
122 | } |
123 | |
124 | postremove() |
125 | { |
126 | mstopunit slim.service |
127 | } |