Magellan Linux

Annotation of /smage/trunk/core/dbus/dbus-1.12.20-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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