Magellan Linux

Annotation of /smage/branches/alx07x-stable/core/dbus/dbus-1.10.22-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11421 - (hide annotations) (download)
Tue Dec 19 12:33:48 2017 UTC (6 years, 4 months ago) by niro
File size: 4427 byte(s)
-release branches/alx07x-stable
1 niro 10325 # $Id$
2    
3     PNAME="dbus"
4     PVER="1.10.22"
5     PBUILD="r1"
6    
7     SPLIT_PACKAGES="dbus-libs dbus dbus-dev dbus-x11"
8    
9     PCAT="sys-apps"
10     HOMEPAGE="http://www.freedesktop.org/Software/dbus"
11    
12     LIB_DEPEND=">= virtual/glibc"
13    
14     DBUS_DEPEND=">= dev-libs/expat-2
15     >= sys-apps/util-linux-2.27
16     >= sys-libs/libsystemd-227"
17    
18     X11_DEPEND=">= x11-libs/libX11-1.6
19     >= x11-libs/libXt-1.1"
20    
21     ALX_DEV_DEPEND=">= dev-libs/expat-dev-2"
22    
23     SDEPEND="${LIB_DEPEND}
24     ${DBUS_DEPEND}
25     ${X11_DEPEND}
26     >= app-text/xmlto-0.0.25
27     >= dev-util/pkgconfig-0.25
28     >= sys-apps/systemd-dev-227
29     >= app-text/docbook-xml-dtd44-4.4
30     >= app-text/docbook-xsl-stylesheets-1.75
31     ${ALX_DEV_DEPEND}
32     >= sys-apps/util-linux-dev-2.27
33     >= x11-libs/libX11-dev-1.6
34     >= x11-libs/libXt-dev-1.1"
35    
36     SRCFILE="${PNAME}-${PVER}.tar.gz"
37     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
38    
39     ALX_PKG_KEEP="etc
40     usr/bin
41     usr/$(mlibdir)/dbus-1.0/dbus-daemon-launch-helper
42     usr/$(mlibdir)/dbus-1.0/services
43     usr/$(mlibdir)/systemd
44     usr/share/dbus-1
45     run"
46     sminclude mtools multilib systemd alx-split
47    
48     SESSION_SCRIPT_REV=2
49    
50     SRC_URI=(
51     http://dbus.freedesktop.org/releases/${PNAME}/${SRCFILE}
52     mirror://${PNAME}/${SRCFILE}
53     mirror://${PNAME}/${PNAME}-1.5.8-no-fatal-warnings.patch
54     )
55    
56     # use subdir $uri/dbus
57     UP2SUBDIR="${PNAME}"
58     UP2DATE="updatecmd_freedesktop ${PNAME} gz"
59    
60     split_info_dbus-libs()
61     {
62     DESCRIPTION="Libraries for accessing D-BUS."
63     DEPEND="${LIB_DEPEND}"
64     PCAT="sys-libs"
65     }
66    
67     split_info_dbus()
68     {
69     DESCRIPTION="D-BUS is a message bus system, a simple way for applications to talk to one another."
70     DEPEND="== sys-libs/dbus-libs-${PVER}
71     ${DBUS_DEPEND}"
72     }
73    
74     split_info_dbus-x11()
75     {
76     DESCRIPTION="X11-requiring add-ons for D-BUS."
77     DEPEND="== sys-libs/dbus-libs-${PVER}
78     == sys-apps/dbus-${PVER}
79     ${X11_DEPEND}"
80     }
81    
82     pkg_setup()
83     {
84     preinstall_dbus
85     }
86    
87     src_prepare()
88     {
89     munpack ${SRCFILE} || die
90    
91     # do not abort on fatal warnings by default
92     mpatch ${PNAME}-1.5.8-no-fatal-warnings.patch || die
93     }
94    
95     src_compile()
96     {
97     # using /lib/systemd/system as systemd units dir even on multilib systems
98     # to have one common rules/script directory!
99     mconfigure \
100     --with-system-pid-file=/run/dbus.pid \
101     --with-system-socket=/run/dbus/system_bus_socket \
102     --with-session-socket-dir=/tmp \
103     --with-test-socket-dir=/tmp \
104     --with-console-auth-dir=/run/console \
105     --libexecdir=/usr/$(mlibdir)/dbus-1.0 \
106     --localstatedir=/var \
107     --with-dbus-user=messagebus \
108     --with-xml=expat \
109     --disable-verbose-mode \
110     --disable-checks \
111     --disable-asserts \
112     --enable-inotify \
113     --disable-dnotify \
114     --with-x \
115     --disable-doxygen-docs \
116     --with-systemdsystemunitdir=$(mget-systemd-unit-dir) \
117     --enable-systemd \
118     || die
119    
120     mmake || die
121     }
122    
123     src_install_dbus-libs()
124     {
125     # fix ln issue on multilib: force overwrite of all symlinks
126     mmake DESTDIR=${BINDIR} LN_S="'ln -sf'" -C dbus install-libLTLIBRARIES || die
127     }
128    
129     # apply alx-split here
130     alx_generic_src_install()
131     {
132     # fix ln issue on multilib: force overwrite of all symlinks
133     mmake install DESTDIR=${BINDIR} LN_S="'ln -sf'" || die
134     # remove libraries provided by the dbus-libs package
135     mmake DESTDIR=${BINDIR} LN_S="'ln -sf'" -C dbus uninstall-libLTLIBRARIES || die
136     # remove dbus-launch provided by dbus-x11 package
137     mdelete /usr/bin/dbus-launch || die
138     mdelete /usr/share/man/man1/dbus-launch.1 || die
139     # remove dbus-run-session provided by dbus-x11 package
140     mdelete /usr/bin/dbus-run-session || die
141     mdelete /usr/share/man/man1/dbus-run-session.1 || die
142    
143     # mark some dirs undeletable
144     mkeepdir /var/lib/dbus || die
145     mkeepdir /run/dbus || die
146     mkeepdir /usr/lib/dbus-1.0/services || die
147     mkeepdir /usr/share/dbus-1/services || die
148     mkeepdir /etc/dbus-1/system.d || die
149     mkeepdir /etc/dbus-1/session.d || die
150    
151     minstalldocs AUTHORS ChangeLog COPYING HACKING NEWS README || die
152     }
153    
154     src_install_dbus-x11()
155     {
156     all-abis minstallexec tools/.libs/dbus-launch || die
157     # all-abis minstallman doc/dbus-launch.1 || die
158    
159     all-abis minstallexec tools/.libs/dbus-run-session || die
160     # all-abis minstallman doc/dbus-run-session.1 || die
161     }
162    
163     preinstall_dbus()
164     {
165     # adds plugdev group
166     mgroupadd -o "-g 302" plugdev
167    
168     # adds messagebus user
169     mgroupadd -o "-g 300" messagebus
170     museradd -o "-M -u 300 -g messagebus -d /dev/null -s /bin/false" messagebus
171     }
172    
173     postinstall_dbus()
174     {
175     # only reload dbus-daemon if already running
176     if pidof dbus-daemon > /dev/null
177     then
178     mreloadunit dbus.service dbus-daemon
179     else
180     mstartunit dbus.service dbus-daemon
181     fi
182     }
183    
184     postremove_dbus()
185     {
186     mstopunit dbus.service dbus-daemon
187     }