]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blob - dbus/dbus.nm
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-3.x
[people/arne_f/ipfire-3.x.git] / dbus / dbus.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = dbus
7 version = 1.4.16
8 release = 2
9
10 groups = System/Daemons
11 url = http://www.freedesktop.org/software/dbus/
12 license = GPLv2+ AFL
13 summary = D-BUS message bus.
14
15 description
16 D-BUS is a system for sending messages between applications. It is
17 used both for the system-wide message bus service, and as a
18 per-user-login-session messaging facility.
19 end
20
21 source_dl = http://dbus.freedesktop.org/releases/dbus/
22
23 build
24 requires
25 audit-devel
26 expat-devel
27 libcap-ng-devel
28 libselinux-devel
29 end
30
31 configure_options += \
32 --sysconfdir=/etc \
33 --localstatedir=/var \
34 --libdir=/%{lib} \
35 --libexecdir=/%{lib} \
36 --enable-libaudit \
37 --enable-selinux=yes \
38 --with-systemdsystemunitdir=/lib/systemd/system/ \
39 --with-dbus-user=dbus
40
41 install_cmds
42 mkdir -pv %{BUILDROOT}%{libdir}
43 mv -v %{BUILDROOT}/%{lib}/pkgconfig %{BUILDROOT}%{libdir}
44
45 #change the arch-deps.h include directory to /usr/lib instead of /lib
46 sed -e 's@-I${libdir}@-I${prefix}/%{lib}@' -i %{BUILDROOT}%{libdir}/pkgconfig/dbus-1.pc
47
48 mkdir -pv %{BUILDROOT}%{libdir}/dbus-1.0/include
49 mv -v %{BUILDROOT}/%{lib}/dbus-1.0/include/* %{BUILDROOT}%{libdir}/dbus-1.0/include
50 rm -rvf %{BUILDROOT}/%{lib}/dbus-1.0
51
52 rm -vf %{BUILDROOT}/%{lib}/libdbus-1.so
53 ln -svf ../../%{lib}/libdbus-1.so.3 %{BUILDROOT}%{libdir}/libdbus-1.so
54 end
55 end
56
57 packages
58 package %{name}
59 prerequires += shadow-utils
60
61 script prein
62 getent group dbus >/dev/null || groupadd -r dbus
63 getent passwd dbus >/dev/null || \
64 useradd -r -g dbus -d / -s /sbin/nologin \
65 -c "User for dbus service" dbus
66 exit 0
67 end
68
69 # Just search for new unit files that were just installed.
70 script postin
71 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
72
73 # The dbus service should be started on default.
74 /bin/systemctl enable dbus.service > /dev/null 2>&1 || :
75 end
76
77 # Disable the service that is to be removed and stop it if it is still running.
78 script preun
79 /bin/systemctl --no-reload disable dbus.service >/dev/null 2>&1 || :
80 /bin/systemctl stop dbus.service >/dev/null 2>&1 || :
81 end
82
83 # Just tell systemd that unitfiles have been removed.
84 script postun
85 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
86 end
87
88 # Try to restart the service if it is running.
89 script postup
90 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
91 /bin/systemctl try-restart dbus.service >/dev/null 2>&1 || :
92 end
93 end
94
95 package %{name}-libs
96 template LIBS
97 end
98
99 package %{name}-devel
100 template DEVEL
101
102 files += /usr/lib/dbus-1.0
103 end
104
105 package %{name}-debuginfo
106 template DEBUGINFO
107 end
108 end