[libnatpmp/el6] Initial SETUP.

Christopher Meng cicku at fedoraproject.org
Sat Feb 15 03:18:02 UTC 2014


commit cf5331a75a5a376c0adad5a2f725091e03e12121
Author: Christopher Meng <i at cicku.me>
Date:   Sat Feb 15 11:16:27 2014 +0800

    Initial SETUP.

 .gitignore                                   |    1 +
 libnatpmp-precluding-cflags-overriding.patch |   18 ++++++++
 libnatpmp.spec                               |   61 ++++++++++++++++++++++++++
 sources                                      |    1 +
 4 files changed, 81 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..7a87a48 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/libnatpmp-20131126.tar.gz
diff --git a/libnatpmp-precluding-cflags-overriding.patch b/libnatpmp-precluding-cflags-overriding.patch
new file mode 100644
index 0000000..fc02ce1
--- /dev/null
+++ b/libnatpmp-precluding-cflags-overriding.patch
@@ -0,0 +1,18 @@
+--- libnatpmp-20131126/Makefile.orig	2014-02-14 15:11:03.817984512 +0800
++++ libnatpmp-20131126/Makefile	2014-02-14 15:11:14.132018382 +0800
+@@ -23,12 +23,9 @@
+ APIVERSION = 1
+ #LDFLAGS = -Wl,--no-undefined
+ CFLAGS = -Os
+-#CFLAGS = -g -O0
+-CFLAGS += -fPIC
+-CFLAGS += -Wall
+-#CFLAGS += -Wextra
+-CFLAGS += -DENABLE_STRNATPMPERR
+-#CFLAGS += -Wstrict-aliasing
++override CFLAGS += -fPIC
++override CFLAGS += -Wall
++override CFLAGS += -DENABLE_STRNATPMPERR
+ 
+ LIBOBJS = natpmp.o getgateway.o
+ 
diff --git a/libnatpmp.spec b/libnatpmp.spec
new file mode 100644
index 0000000..ed51601
--- /dev/null
+++ b/libnatpmp.spec
@@ -0,0 +1,61 @@
+Name:           libnatpmp
+Version:        20131126
+Release:        2%{?dist}
+Summary:        Library of The NAT Port Mapping Protocol (NAT-PMP)
+License:        LGPLv2+
+URL:            http://miniupnp.free.fr/libnatpmp.html
+Source0:        http://miniupnp.free.fr/files/%{name}-%{version}.tar.gz
+Patch0:         libnatpmp-precluding-cflags-overriding.patch
+
+%description
+libnatpmp is an attempt to make a portable and fully compliant implementation 
+of the protocol for the client side. It is based on non blocking sockets and 
+all calls of the API are asynchronous. It is therefore very easy to integrate 
+the NAT-PMP code to any event driven code.
+
+%package        devel
+Summary:        Development files for %{name}
+Requires:       %{name}%{?_isa} = %{version}-%{release}
+
+%description    devel
+This package contains libraries and header files for
+developing applications that use %{name}.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+make CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" %{?_smp_mflags}
+
+%install
+make install INSTALL="install -p" PREFIX=%{buildroot} INSTALLDIRLIB="%{buildroot}%{_libdir}"
+find %{buildroot} -name '*.a' -delete -print
+find %{buildroot} -name '*.so' -exec chmod 755 {} ";" -print
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%doc Changelog.txt LICENSE README
+%{_bindir}/natpmpc
+%{_libdir}/*.so.*
+
+%files devel
+%{_libdir}/*.so
+%{_includedir}/natpmp.h
+
+%changelog
+* Fri Feb 14 2014 Christopher Meng <rpm at cicku.me> - 20131126-2
+- COrrect the permissions to get useful debuginfo packages.
+
+* Thu Jan 02 2014 Christopher Meng <rpm at cicku.me> - 20131126-1
+- Update to 20131126
+- Append proper CFLAGS to make.
+
+* Wed Sep 11 2013 Christopher Meng <rpm at cicku.me> - 20130911-1
+- Update to 20130911
+
+* Tue May 21 2013 Christopher Meng <rpm at cicku.me> - 20120821-1
+- Initial Package.
diff --git a/sources b/sources
index e69de29..26499a8 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+211921e35fb3f21f525518d265f3d554  libnatpmp-20131126.tar.gz


More information about the scm-commits mailing list