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