Accepting request 102948 from home:elvigia:branches:network

- Use systemd macros correctly 
- build with PIE and full RELRO.

OBS-URL: https://build.opensuse.org/request/show/102948
OBS-URL: https://build.opensuse.org/package/show/network/dnsmasq?expand=0&rev=29
This commit is contained in:
Uwe Gansert
2012-02-07 15:24:59 +00:00
committed by Git OBS Bridge
parent 138204aee2
commit c6ed0facf8
2 changed files with 21 additions and 13 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Feb 6 22:25:05 UTC 2012 - crrodriguez@opensuse.org
- Use systemd macros correctly
- build with PIE and full RELRO.
-------------------------------------------------------------------
Thu Jan 19 04:22:44 UTC 2012 - crrodriguez@opensuse.org

View File

@@ -16,13 +16,12 @@
#
Name: dnsmasq
Summary: Lightweight, Easy-to-Configure DNS Forwarder and DHCP Server
Version: 2.59
Release: 1
License: GPLv2+
License: GPL-2.0+
Group: Productivity/Networking/DNS/Servers
Version: 2.59
Release: 0
Provides: dns_daemon
PreReq: /usr/sbin/useradd %fillup_prereq %insserv_prereq /bin/mkdir
Url: http://www.thekelleys.org.uk/dnsmasq/
@@ -32,7 +31,12 @@ Source2: dnsmasq.service
Patch1: group_and_isc.diff
Patch3: manpage.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: dbus-1-devel libidn libidn-devel pkg-config
BuildRequires: dbus-1-devel
BuildRequires: libidn
BuildRequires: libidn-devel
BuildRequires: pkg-config
BuildRequires: systemd
%{?systemd_requires}
%description
Dnsmasq is a lightweight, easy-to-configure DNS forwarder and DHCP
@@ -53,23 +57,25 @@ echo "#define HAVE_DBUS" >> src/config.h
%build
mv po/no.po po/nb.po
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC -DPIC -fpie -fno-strict-aliasing"
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
make %{?_smp_mflags} AWK=gawk all-i18n
%pre
if ! /usr/bin/getent passwd dnsmasq >/dev/null; then
/usr/sbin/useradd -r -d /var/lib/empty -s /bin/false -c "dnsmasq" -g nogroup dnsmasq || :
fi
%service_add_pre %{name}.service
%post
%{fillup_and_insserv dnsmasq}
%service_add_post %{name}.service
%preun
%stop_on_removal dnsmasq
%service_del_preun %{name}.service
%postun
%restart_on_update dnsmasq
%{insserv_cleanup}
%service_del_postun %{name}.service
%install
make install-i18n DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr AWK=gawk
@@ -84,9 +90,7 @@ install -m 644 SuSEFirewall.dnsmasq-dns ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconf
install -m 644 SuSEFirewall.dnsmasq-dhcp ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/dnsmasq-dhcp
install -d 755 ${RPM_BUILD_ROOT}/etc/dbus-1/system.d/
install -m 644 dbus/dnsmasq.conf ${RPM_BUILD_ROOT}/etc/dbus-1/system.d/dnsmasq.conf
%if 0%{?suse_version} >= 1210
install -D -m 0644 %SOURCE2 %{buildroot}/lib/systemd/system/dnsmasq.service
%endif
%find_lang %{name}
%files -f %{name}.lang
@@ -104,8 +108,6 @@ install -D -m 0644 %SOURCE2 %{buildroot}/lib/systemd/system/dnsmasq.service
%{_mandir}/fr/man8/dnsmasq.8.gz
%{_mandir}/es/man8/dnsmasq.8.gz
/etc/dbus-1/system.d/dnsmasq.conf
%if 0%{?suse_version} >= 1210
/lib/systemd/system/dnsmasq.service
%endif
%changelog