Magellan Linux

Contents of /smage/trunk/core/slim/slim-1.3.6-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5285 - (show annotations) (download)
Wed Dec 18 08:47:10 2013 UTC (10 years, 5 months ago) by niro
File size: 3184 byte(s)
auto added: ver bump to 1.3.6-r1
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 )
46
47 UP2DATE="updatecmd_berlios ${PNAME}"
48
49 src_prepare()
50 {
51 munpack ${SRCFILE} || die
52 cd ${SRCDIR}
53
54 # fix linking
55 mpatch ${PNAME}-${PVER}-fix-libslim-libraries.patch || die
56 # enable the new session dir support
57 mpatch ${PNAME}-${PVER}-add-sessiondir.patch || die
58
59 # fix location of systemd services and libslim
60 sed -i -e 's:set(LIBDIR "/lib"):set(LIBDIR "/usr/lib"):' \
61 -e "s:LIBRARY DESTINATION lib:LIBRARY DESTINATION $(mlibdir):" \
62 -e "s:ARCHIVE DESTINATION lib:ARCHIVE DESTINATION $(mlibdir):" \
63 CMakeLists.txt || die
64
65 # rename sim.lock to sim.pid and enable daemon mode by default
66 # fix the shutdown and reboot commands to match busybox
67 # secure x11 with -nolisten tcp
68 # and usr /run instead of /var/run
69 sed -i -e "s:/var/run/slim.lock:/run/slim.pid:" \
70 -e "s:/var/run/slim.auth:/run/slim.auth:" \
71 -e "s:# daemon.*:daemon\tyes:" \
72 -e "s:^\(halt_cmd.*\):\1\t/sbin/halt:" \
73 -e "s:^\(reboot_cmd.*\):\1\t/sbin/reboot:" \
74 -e "s:#xserver_arguments.*:xserver_arguments\t-nolisten tcp vt01:" \
75 slim.conf || die
76
77 # alx: enable autologin for user station
78 sed -i -e "s:# default_user.*:default_user station:" \
79 -e "s:# auto_login.*:auto_login yes:" \
80 slim.conf || die
81 }
82
83 src_compile()
84 {
85 cd ${SRCDIR}
86 cmake_configure $(cmake_opt USE_PAM no) $(cmake_opt USE_CONSOLEKIT no) || die
87 mmake || die
88 }
89
90 alx_generic_src_install()
91 {
92 cd ${SRCDIR}
93 mmake DESTDIR=${BINDIR} install || die
94
95 minstallunit slim.service-${SVC_REV} slim.service || die
96 minstalltmp slim.tmpfiles-${TMPFILES_REV} slim.conf || die
97
98 # install a custom slim.conf
99 echo -e ${COLGREEN}" injecting custom slim-configs"${COLDEFAULT}
100 mcinjectfile alx-slim.theme /usr/share/slim/themes/default/slim.theme || die
101 mcinjectfile alx-panel.png /usr/share/slim/themes/default/panel.png || die
102 mcinjectfile alx-thinclient-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 preinstall()
110 {
111 add_conf_prot_mask /etc/slim.conf /etc/tmpfiles.d
112 }
113
114 postinstall()
115 {
116 mstartunit slim.service
117 }
118
119 postremove()
120 {
121 mstopunit slim.service
122 }