miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

build rpm for mandriva linux

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation
View previous topic :: View next topic  
Author Message
zamir



Joined: 01 Mar 2010
Posts: 16

PostPosted: Wed Mar 10, 2010 6:14 am    Post subject: build rpm for mandriva linux Reply with quote

# cat miniupnpd.make.diff
Code:
--- ./Makefile.linux~   2010-03-08 20:13:54.000000000 +0300
+++ ./Makefile.linux   2010-03-09 09:44:13.000000000 +0300
@@ -66,7 +66,7 @@
 TEST := $(shell test -f /usr/include/iptables/internal.h && grep -q "\#define IPTABLES_VERSION" /usr/include/iptables/internal.h && echo 1)
 ifeq ($(TEST), 1)
 CFLAGS := $(CFLAGS) -DIPTABLES_143
-LIBS = /usr/lib/libiptc.a
+LIBS = -liptc
 endif
 endif


#cat miniupnpd.spec
Code:
Summary:   The UPNP & NAT-PMP implementation
Name:      miniupnpd
Version:   1.4.20100308
Release:   1
License:   GPL
Group:     Applications/Internet
Source:    %{name}-%{version}.tar.gz
Buildroot: /tmp/%{name}-%{version}-root
Prefix:    /usr
BuildPrereq: iptables-devel

Patch0: miniupnpd.make.diff
Source1: miniupnpd.init.d.script

%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.

%prep
%setup -q -n %{name}-%{version}
%patch0 -p0

%install
PREFIX=%{buildroot} make -f Makefile.linux install
rm -f %{buildroot}%{_sysconfdir}/init.d/miniupnpd
rm -f %{buildroot}%{_sysconfdir}/miniupnpd/miniupnpd.conf~
#install -m 755 miniupnpdctl %{buildroot}%{_sbindir}
install -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}

%clean
rm -fr %{buildroot}

%files
%defattr(-,root,root)
%{_sbindir}/miniupnpd
%{_initrddir}/miniupnpd
%config(noreplace) %{_sysconfdir}/miniupnpd/*
%doc README Changelog.txt


# cat miniupnpd.init.d.script
Code:
#! /bin/sh
#
# miniUPnP   Script to control the miniupnp daemon
#
# chkconfig: 2345 86 14
# description: The miniUPnP daemon is an UPnP IGD
# processname: miniupnpd
# config: /etc/miniupnpd/miniupnpd.conf


# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n "Starting miniupnpd: "
        daemon miniupnpd -f /etc/miniupnpd/miniupnpd.conf
        echo
        touch /var/lock/subsys/miniupnpd
        ;;

  stop)
        # Stop daemons.
        echo -n "Shutting down miniupnpd: "
   killproc miniupnpd
        echo
        rm -f /var/lock/subsys/miniupnpd
        ;;

  reload|restart)
   $0 stop
   $0 start
   ;;

  status)
   status miniupnpd
   ;;

  *)
        echo "Usage: $0 {start|stop|restart|reload|status}"
        exit 1
esac

exit 0



rpmbuild -ba miniupnpd.spec
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.