SPECS: net-snmp.spec - merge static_libs, rpm-hrmib changes from A...
glen
glen at pld-linux.org
Mon Mar 3 02:33:27 CET 2008
Author: glen Date: Mon Mar 3 01:33:27 2008 GMT
Module: SPECS Tag: HEAD
---- Log message:
- merge static_libs, rpm-hrmib changes from AC-branch
---- Files affected:
SPECS:
net-snmp.spec (1.113 -> 1.114)
---- Diffs:
================================================================
Index: SPECS/net-snmp.spec
diff -u SPECS/net-snmp.spec:1.113 SPECS/net-snmp.spec:1.114
--- SPECS/net-snmp.spec:1.113 Sun Mar 2 18:10:00 2008
+++ SPECS/net-snmp.spec Mon Mar 3 02:33:22 2008
@@ -18,6 +18,7 @@
%bcond_without lm_sensors # don't include sensors support
%bcond_without perl # don't include Perl modules and utils
%bcond_without python # don't include Python modules
+%bcond_without static_libs # don't build static library
#
%include /usr/lib/rpm/macros.perl
Summary: A collection of SNMP protocol tools
@@ -28,7 +29,7 @@
Summary(uk.UTF-8): Набір утиліт для протоколу SNMP від UC-Davis
Name: net-snmp
Version: 5.4.1
-Release: 8
+Release: 9
License: BSD-like
Group: Networking/Daemons
Source0: http://dl.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
@@ -53,6 +54,7 @@
Patch9: %{name}-python.patch
Patch10: %{name}-lvalue.patch
Patch11: %{name}-defaultconfig.patch
+Patch12: %{name}-use-rpm-hrmib.patch
URL: http://www.net-snmp.org/
BuildRequires: autoconf >= 2.61-3
BuildRequires: automake
@@ -82,10 +84,10 @@
Obsoletes: cmu-snmp
Obsoletes: snmpd
Obsoletes: ucd-snmp
+Conflicts: rpm < 4.4.9-43.11
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define logfile /var/log/snmpd.log
-%define filterout_ld -Wl,--as-needed
%description
SNMP (Simple Network Management Protocol) is a protocol used for
@@ -418,6 +420,7 @@
%patch9 -p1
%patch10 -p1
%patch11 -p1
+%patch12 -p1
%build
%{__libtoolize}
@@ -427,6 +430,7 @@
%configure \
--disable-debugging \
--enable-as-needed \
+ %{!?with_static_libs:--disable-static} \
--with-cflags="%{rpmcflags} -I/usr/include/et" \
--with-ldflags="%{rpmldflags}" \
--with-defaults \
@@ -511,6 +515,21 @@
rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Bundle/Makefile.subs.pl
rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Bundle/NetSNMP/.packlist
+%if %{with static_libs}
+# hack: convert DynaLoader.a inside .a file to .o, as strip(1) would otherwise say invalid argument
+for a in $RPM_BUILD_ROOT%{_libdir}/libnet*.a; do
+ rm -f *.o *.a
+ ar x $a DynaLoader.a
+ if [ -f DynaLoader.a ]; then
+ ar x DynaLoader.a
+ ar cr $a DynaLoader.o
+ ar d $a DynaLoader.a
+ # remove second file too
+ ar d $a DynaLoader.a
+ fi
+done
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -589,9 +608,11 @@
%{_mandir}/man3/[!NS]*
%{_mandir}/man5/mib2c.conf.5*
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libnet*.a
+%endif
%files compat-devel
%defattr(644,root,root,755)
@@ -599,9 +620,11 @@
%{_libdir}/libsnmp.la
%{_includedir}/ucd-snmp
+%if %{with static_libs}
%files compat-static
%defattr(644,root,root,755)
%{_libdir}/libsnmp.a
+%endif
%files mibs
%defattr(644,root,root,755)
@@ -724,6 +747,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.114 2008-03-03 01:33:22 glen
+- merge static_libs, rpm-hrmib changes from AC-branch
+
Revision 1.113 2008-03-02 17:10:00 radek
- release 8: rebuild with perl without -DDEBUGGING
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/net-snmp.spec?r1=1.113&r2=1.114&f=u
More information about the pld-cvs-commit
mailing list