diff --git a/osmo-ggsn.spec b/osmo-ggsn.spec index a4ad857..03d7a01 100644 --- a/osmo-ggsn.spec +++ b/osmo-ggsn.spec @@ -23,7 +23,7 @@ Summary: GPRS Support Node License: GPL-2.0 AND LGPL-2.1+ Group: Productivity/Telephony/Servers URL: https://osmocom.org/projects/openggsn/wiki/OsmoGGSN -Source: %{name}-%{version}.tar.xz +Source: %name-%version.tar.xz #Patch1: build-fixes.diff Patch2: build-fixes2.diff Patch3: 0001-fix-compiler-warnings-return-0-in-main-in-3-tests.patch @@ -57,7 +57,7 @@ libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN. Summary: Development files for the GTP library License: GPL-2.0 Group: Development/Libraries/C and C++ -Requires: libgtp2 = %{version} +Requires: libgtp2 = %version %description -n libgtp-devel libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN. @@ -72,60 +72,60 @@ applications that want to make use of libgtp. %patch3 -p1 %build -echo "%{version}" >.tarball-version +echo "%version" >.tarball-version autoreconf -fi %configure \ --disable-static \ - --docdir=%{_docdir}/%{name} \ - --includedir="%{_includedir}/%{name}" + --docdir=%_docdir/%name \ + --includedir="%_includedir/%name" make %{?_smp_mflags} V=1 %install -b=%{buildroot} +b=%buildroot %make_install -find %{buildroot} -type f -name "*.la" -delete -print -install -D -m 0644 contrib/osmo-ggsn.service "$b/%{_unitdir}/%{name}.service" -install -d %{buildroot}/%{_sbindir} -ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} -install -d %{buildroot}%{_sysconfdir}/osmocom -install -m 0644 doc/examples/osmo-ggsn.cfg %{buildroot}%{_sysconfdir}/osmocom/osmo-ggsn.cfg -install -m 0644 doc/examples/sgsnemu.conf %{buildroot}%{_sysconfdir}/osmocom/sgsnemu.conf +find %buildroot -type f -name "*.la" -delete -print +install -D -m 0644 contrib/osmo-ggsn.service "$b/%_unitdir/%name.service" +install -d %buildroot/%_sbindir +ln -s %_sbindir/service %buildroot%_sbindir/rc%name +install -d %buildroot%_sysconfdir/osmocom +install -m 0644 doc/examples/osmo-ggsn.cfg %buildroot%_sysconfdir/osmocom/osmo-ggsn.cfg +install -m 0644 doc/examples/sgsnemu.conf %buildroot%_sysconfdir/osmocom/sgsnemu.conf %pre -%service_add_pre %{name}.service +%service_add_pre %name.service %post -%service_add_post %{name}.service +%service_add_post %name.service %preun -%service_del_preun %{name}.service +%service_del_preun %name.service %postun -%service_del_postun %{name}.service +%service_del_postun %name.service %post -n libgtp2 -p /sbin/ldconfig %postun -n libgtp2 -p /sbin/ldconfig %files %doc AUTHORS COPYING README.md -%{_sbindir}/osmo-ggsn -%{_sbindir}/sgsnemu -%{_mandir}/man8/osmo-ggsn.8%{ext_man} -%{_mandir}/man8/sgsnemu.8%{ext_man} -%{_unitdir}/%{name}.service -%{_sbindir}/rc%{name} -%dir %{_docdir}/%{name}/examples -%{_docdir}/%{name}/examples/osmo-ggsn.cfg -%dir %{_sysconfdir}/osmocom -%config(noreplace) %{_sysconfdir}/osmocom/osmo-ggsn.cfg -%config(noreplace) %{_sysconfdir}/osmocom/sgsnemu.conf +%_sbindir/osmo-ggsn +%_sbindir/sgsnemu +%_mandir/man8/osmo-ggsn.8%ext_man +%_mandir/man8/sgsnemu.8%ext_man +%_unitdir/%name.service +%_sbindir/rc%name +%dir %_docdir/%name/examples +%_docdir/%name/examples/osmo-ggsn.cfg +%dir %_sysconfdir/osmocom +%config(noreplace) %_sysconfdir/osmocom/osmo-ggsn.cfg +%config(noreplace) %_sysconfdir/osmocom/sgsnemu.conf %files -n libgtp2 -%{_libdir}/libgtp.so.2* +%_libdir/libgtp.so.2* %files -n libgtp-devel -%{_includedir}/%{name}/ -%{_libdir}/libgtp.so -%{_libdir}/pkgconfig/libgtp.pc +%_includedir/%name/ +%_libdir/libgtp.so +%_libdir/pkgconfig/libgtp.pc %changelog