Magellan Linux

Annotation of /trunk/core/dbus/dbus-1.12.16-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 33033 - (hide annotations) (download)
Thu Oct 10 17:58:44 2019 UTC (4 years, 6 months ago) by niro
File size: 4387 byte(s)
-systemd-243 rebuild
1 niro 33033 # $Id$
2    
3     PNAME="dbus"
4     PVER="1.12.16"
5     PBUILD="r2"
6    
7     SPLIT_PACKAGES="dbus-libs dbus dbus-x11"
8    
9     PCAT="sys-apps"
10     HOMEPAGE="http://www.freedesktop.org/Software/dbus"
11    
12     LIB_DEPEND=">= virtual/glibc"
13    
14     # call systemctl depend here because systemd gets always installed after dbus
15     DBUS_DEPEND=">= dev-libs/expat-2
16     >= sys-apps/util-linux-2.34
17     >= sys-libs/libsystemd-243
18     >= sys-apps/systemd-systemctl-243"
19    
20     X11_DEPEND=">= x11-libs/libX11-1.6
21     >= x11-libs/libXt-1.1"
22    
23     # disable atm
24     msetfeature "!check"
25     if mqueryfeature "check"
26     then
27     CHECK_DEPEND=">= dev-libs/dbus-glib-0.110
28     >= dev-python/python2-dbus-1.2"
29     else
30     CHECK_DEPEND=""
31     fi
32    
33     SDEPEND="${LIB_DEPEND}
34     ${DBUS_DEPEND}
35     ${X11_DEPEND}
36     ${CHECK_DEPEND}
37     >= app-text/xmlto-0.0.26
38     >= dev-util/pkgconfig-0.25
39     >= sys-apps/systemd-243
40     >= app-text/docbook-xml-dtd44-4.4
41     >= app-text/docbook-xsl-stylesheets-1.75"
42    
43     SRCFILE="${PNAME}-${PVER}.tar.gz"
44     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
45    
46     sminclude mtools multilib systemd
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     --enable-user-session \
119     || die
120    
121     mmake || die
122     }
123    
124     src_install_dbus-libs()
125     {
126     # fix ln issue on multilib: force overwrite of all symlinks
127     mmake DESTDIR=${BINDIR} LN_S="'ln -sf'" -C dbus install-libLTLIBRARIES || die
128     }
129    
130     src_install_dbus()
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     }