Magellan Linux

Annotation of /smage/branches/alx07x-unstable/core/slim/slim-1.3.6-r10.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14252 - (hide annotations) (download)
Tue Jul 7 07:43:26 2020 UTC (3 years, 10 months ago) by niro
Original Path: smage/trunk/core/slim/slim-1.3.6-r10.smage2
File size: 3748 byte(s)
auto added: ver bump to 1.3.6-r10
1 niro 14252 # $Id$
2    
3     PNAME="slim"
4     PVER="1.3.6"
5     PBUILD="r10"
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     >= x11-libs/libXrandr-1.5
17     >= media-libs/libpng-1.5
18     >= virtual/libjpeg
19     >= sys-libs/libstdc++-8.3"
20    
21     SDEPEND=">= dev-util/pkgconfig-0.25
22     >= virtual/xproto
23     >= virtual/sed
24     >= x11-libs/libXmu-dev-1.1
25     >= x11-libs/libX11-dev-1.6
26     >= x11-libs/libXpm-dev-3.5
27     >= x11-libs/libXft-dev-2.2
28     >= x11-libs/libXrandr-dev-1.5
29     >= media-libs/libpng-dev-1.5
30     >= virtual/libjpeg-dev
31     >= sys-libs/libstdc++-dev-8.3"
32    
33     PROVIDE="virtual/graphical-login"
34    
35     SRCFILE="${PNAME}-${PVER}.tar.gz"
36     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
37    
38     ALX_PKG_KEEP="etc/slim.conf
39     etc/tmpfiles.d
40     usr/bin/slim
41     usr/$(mlibdir)/libslim.so.*
42     usr/lib/systemd
43     usr/share/slim/themes/default"
44     sminclude mtools cmake systemd alx-split
45    
46     SVC_REV=1.4
47     TMPFILES_REV=1.2
48    
49     # += to add injection files (alx.sminc)
50     SRC_URI+=(
51     http://download.berlios.de/${PNAME}/${SRCFILE}
52     mirror://${PNAME}/${SRCFILE}
53     mirror://${PNAME}/slim.service-${SVC_REV}
54     mirror://${PNAME}/slim.tmpfiles-${TMPFILES_REV}
55     mirror://${PNAME}/${PNAME}-${PVER}-add-sessiondir.patch
56     mirror://${PNAME}/${PNAME}-${PVER}-fix-libslim-libraries.patch
57     mirror://${PNAME}/${PNAME}-${PVER}-only-build-slimlock-with-pam.patch
58     )
59    
60     UP2DATE="updatecmd_berlios ${PNAME}"
61    
62     src_prepare()
63     {
64     munpack ${SRCFILE} || die
65     cd ${SRCDIR}
66    
67     # fix linking
68     mpatch ${PNAME}-${PVER}-fix-libslim-libraries.patch || die
69     # enable the new session dir support
70     mpatch ${PNAME}-${PVER}-add-sessiondir.patch || die
71     # fix build without pam enabled
72     mpatch ${PNAME}-${PVER}-only-build-slimlock-with-pam.patch || die
73    
74     # fix location of systemd services and libslim
75     sed -i -e 's:set(LIBDIR "/lib"):set(LIBDIR "/usr/lib"):' \
76     -e "s:LIBRARY DESTINATION lib:LIBRARY DESTINATION $(mlibdir):" \
77     -e "s:ARCHIVE DESTINATION lib:ARCHIVE DESTINATION $(mlibdir):" \
78     CMakeLists.txt || die
79    
80     # rename sim.lock to sim.pid and enable daemon mode by default
81     # fix the shutdown and reboot commands to match busybox
82     # secure x11 with -nolisten tcp
83     # and usr /run instead of /var/run
84     sed -i -e "s:/var/run/slim.lock:/run/slim.pid:" \
85     -e "s:/var/run/slim.auth:/run/slim.auth:" \
86     -e "s:# daemon.*:daemon\tyes:" \
87     -e "s:^\(halt_cmd.*\):\1\t/sbin/halt:" \
88     -e "s:^\(reboot_cmd.*\):\1\t/sbin/reboot:" \
89     -e "s:#xserver_arguments.*:xserver_arguments\t-nolisten tcp vt01:" \
90     slim.conf || die
91    
92     # alx: enable autologin for user station
93     sed -i -e "s:#default_user.*:default_user station:" \
94     -e "s:#auto_login.*:auto_login yes:" \
95     slim.conf || die
96     }
97    
98     src_compile()
99     {
100     cd ${SRCDIR}
101     cmake_configure $(cmake_opt USE_PAM no) $(cmake_opt USE_CONSOLEKIT no) || die
102     mmake || die
103     }
104    
105     alx_generic_src_install()
106     {
107     cd ${SRCDIR}
108     mmake DESTDIR=${BINDIR} install || die
109    
110     # we use our own service file to honor plymouth and tty1 X11
111     minstallunit slim.service-${SVC_REV} slim.service || die
112     minstalltmp slim.tmpfiles-${TMPFILES_REV} slim.conf || die
113    
114     # install a custom slim.conf
115     echo -e ${COLGREEN}" injecting custom slim-configs"${COLDEFAULT}
116     mcinjectfile alx-slim.theme /usr/share/slim/themes/default/slim.theme || die
117     mcinjectfile alx-panel.png /usr/share/slim/themes/default/panel.png || die
118     mcinjectfile alx-thinclient-wallpaper.png /usr/share/slim/themes/default/background.png || die
119     if [ -f ${BINDIR}/usr/share/slim/themes/default/background.jpg ]
120     then
121     rm ${BINDIR}/usr/share/slim/themes/default/background.jpg || die
122     fi
123     }
124    
125     preinstall()
126     {
127     add_conf_prot_mask /etc/slim.conf /etc/tmpfiles.d
128     }
129    
130     postinstall()
131     {
132     mstartunit slim.service
133     }
134    
135     postremove()
136     {
137     mstopunit slim.service
138     }