]>
Commit | Line | Data |
---|---|---|
6eb34be2 | 1 | # |
2 | # TODO: | |
3 | # - move header file to -devel | |
53fe5653 | 4 | # - split an -init (what for? --radek) |
6eb34be2 | 5 | # |
83b3e3fa | 6 | Summary: DHCP D-BUS daemon (dhcdbd) controls dhclient sessions with D-BUS, stores and presents DHCP options |
1a0372cd | 7 | Summary(pl.UTF-8): Demon DHCP D-BUS (dhcdbd) - sterowanie sesjami dhclient przy użyciu D-BUS, przechowywanie opcji DHCP |
6eb34be2 | 8 | Name: dhcdbd |
e66ffb63 | 9 | Version: 2.7 |
57878023 | 10 | Release: 1 |
6eb34be2 | 11 | License: GPL |
12 | Group: Networking/Daemons | |
bf13e017 | 13 | Source0: http://people.redhat.com/dcantrel/dhcdbd/%{name}-%{version}.tar.bz2 |
e66ffb63 | 14 | # Source0-md5: 9edf3eabe05487e7ee5f0b685683d7fb |
6eb34be2 | 15 | Source1: %{name}.init |
6e4d1dca | 16 | URL: http://people.redhat.com/dcantrel/dhcdbd/ |
6eb34be2 | 17 | BuildRequires: dbus-devel >= 0.33 |
a82da659 | 18 | BuildRequires: rpmbuild(macros) >= 1.268 |
a90d2215 | 19 | Requires(post,preun): /sbin/chkconfig |
6eb34be2 | 20 | Requires: dbus >= 0.33 |
f9032c50 | 21 | Requires: dhcp-client >= 4:3.0.5-1 |
6eb34be2 | 22 | Requires: rc-scripts |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | DHCP D-BUS daemon (dhcdbd) controls dhclient sessions with D-BUS, | |
27 | stores and presents DHCP options. | |
28 | ||
637c3dc7 JR |
29 | %description -l pl.UTF-8 |
30 | Demon DHCP D-BUS (dhcdbd) steruje sesjami dhclient przy użyciu D-BUS, | |
31 | a także przechowuje i przedstawia opcje DHCP. | |
6eb34be2 | 32 | |
33 | %prep | |
34 | %setup -q | |
35 | ||
36 | %build | |
37 | %{__make} \ | |
83b3e3fa | 38 | CC="%{__cc}" \ |
bf13e017 | 39 | CFLAGS="%{rpmcflags} -I../include" |
83b3e3fa | 40 | LDFLAGS="%{rpmldflags}" |
6eb34be2 | 41 | |
bf13e017 | 42 | %{__sed} -i -e"s@Exec=.*@Exec=%{_sbindir}/dhcdbd@" dhcdbd.service |
43 | ||
6eb34be2 | 44 | %install |
45 | rm -rf $RPM_BUILD_ROOT | |
53fe5653 | 46 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sbindir}} |
6eb34be2 | 47 | |
48 | %{__make} install \ | |
49 | DESTDIR=$RPM_BUILD_ROOT | |
50 | ||
53fe5653 | 51 | mv $RPM_BUILD_ROOT{/sbin/dhcdbd,%{_sbindir}} |
52 | ||
ad3882c2 | 53 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcdbd |
6eb34be2 | 54 | |
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %post | |
59 | /sbin/chkconfig --add dhcdbd | |
a82da659 | 60 | %service dhcdbd restart "DHCP D-BUS daemon" |
6eb34be2 | 61 | if [ -f /var/lock/subsys/dhcdbd ]; then |
a82da659 | 62 | echo "You will probably also need \"/sbin/service messagebus restart\"" |
6eb34be2 | 63 | echo "to reload the *.service database." |
64 | fi | |
65 | ||
6eb34be2 | 66 | %preun |
67 | if [ "$1" = "0" ]; then | |
a82da659 ER |
68 | %service dhcdbd stop |
69 | /sbin/chkconfig --del dhcdbd | |
6eb34be2 | 70 | fi |
71 | ||
72 | %files | |
73 | %defattr(644,root,root,755) | |
bf13e017 | 74 | %doc README |
ad3882c2 | 75 | %attr(755,root,root) %{_sbindir}/dhcdbd |
6eb34be2 | 76 | %attr(754,root,root) /etc/rc.d/init.d/dhcdbd |
83b3e3fa | 77 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dbus-1/system.d/dhcdbd.conf |
6eb34be2 | 78 | %{_datadir}/dbus-1/services/dhcdbd.service |