miniupnpd/miniupnpd.spec

72 lines
1.7 KiB
RPMSpec
Raw Normal View History

Summary: The UPNP & NAT-PMP implementation
Name: miniupnpd
2025-02-20 12:46:05 +00:00
Version: 2.3.7
Release: 1
License: GPLv2+
Group: System/Servers
2025-02-20 12:46:05 +00:00
URL: http://miniupnp.free.fr
#Source0: http://miniupnp.free.fr/files/download.php?file=/%{name}-%{version}.tar.gz
Source0: http://miniupnp.free.fr/files/download.php?file=%{name}-%{version}.tar.gz
Source1: miniupnpd.service
Patch0: miniupnpd-1.8.20140523-makefile.patch
BuildRequires: iptables-devel
BuildRequires: iptables-ip4tc-devel
2025-02-20 12:46:05 +00:00
BuildRequires: kernel-generic-devel
BuildRequires: pkgconfig(libiptc)
2012-11-13 19:13:43 +04:00
BuildRequires: pkgconfig(libnetfilter_conntrack)
Requires: iptables
Requires(post,preun,postun): systemd
%description
The miniUPnP daemon is an UPnP IGD (internet gateway device)
which provide NAT traversal services to any UPnP enabled client on
the network.
See http://www.upnp.org/ for more details on UPnP.
%files
%doc README Changelog.txt
%config(noreplace) %{_sysconfdir}/miniupnpd/*
%{_sbindir}/miniupnpd
%{_unitdir}/miniupnpd*
%{_mandir}/man*/*
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
#----------------------------------------------------------------------------
%prep
%setup -q
2025-02-20 12:46:05 +00:00
#mv Makefile.linux Makefile
#patch0 -p1
%build
2025-02-20 12:46:05 +00:00
#make config.h
#sed -i \
# -e 's/\/\*#define ENABLE_LEASEFILE\*\//#define ENABLE_LEASEFILE/g' \
# config.h || die
#make CC=gcc CFLAGS="%{optflags}"
#make -f Makefile.linux config.h
#make -f Makefile.linux
./configure
%make
%install
2025-02-20 12:46:05 +00:00
%makeinstall_std
#mkdir -p %{buildroot}%{_mandir}/man8/
2025-02-20 12:46:05 +00:00
#make install PREFIX="%{buildroot}" STRIP="true"
rm -f %{buildroot}%{_sysconfdir}/init.d/miniupnpd
rm -f %{buildroot}%{_sysconfdir}/miniupnpd/miniupnpd.conf~
2025-02-20 12:46:05 +00:00
install -Dm0755 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service