Hello Thomas,
Just in case, here goes the updated patch.
Cheers,
Stanislav
On Mon, Sep 05, 2011 at 01:37:23PM +0800, Thomas Goirand wrote:
> On 09/05/2011 01:34 PM, Thomas Goirand wrote:
> > -Replaces: libnatpmp0 (<= 20110808-2)
> > +Replaces: libnatpmp0, libnatpmp1 (<< ${binary:Version})
> >
> > I think what I did was right, because after version 20110808-2, we don't
> > have the upgrade issue.
>
> Woops, wrote something silly. What we need IMO is:
>
> Package: natpmp-utils
> [...]
> -Replaces: libnatpmp0 (<= 20110808-2)
> +Replaces: libnatpmp0, libnatpmp1 (<= 20110808-2)
>
> Thomas
diff --git a/debian/changelog b/debian/changelog
index 173c879..de814ef 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,26 @@
libnatpmp (20110808-3) unstable; urgency=low
+ [ Thomas Goirand ]
* Moves the natpmpc inside a new natpmp-utils package (Closes: #639084).
* Removes Debian specific natpmpc.1, since upstream integrated it in his
- upstream tarball.
+ upstream tarball.
+
+ [ Stanislav Maslovski ]
+ * debian/control:
+ - no need to build-depend/depend on python: python module is not built
+ - corrected libnatpmp1 dependencies
+ - corrected libnatpmp-dev dependencies
+ - natpmp-utils replaces older libnatpmp binaries
+ - linatpmp1 suggests natpmp-utils
+ * debian/rules:
+ - do not move files by hand, use dh_install
+ - install docs and changelogs only once
+ * new files:
+ - natpmp-utils.install, natpmp-utils.manpages,
+ libnatpmp-dev.install, libnatpmp1.install
+ * removed files:
+ - libnatpmp1.shibls (not needed; autogenerated by dh_makeshlibs),
+ manpages
-- Thomas Goirand <[email protected]> Wed, 24 Aug 2011 12:02:12 +0800
diff --git a/debian/control b/debian/control
index fcd66c2..7b847eb 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: libnatpmp
Section: net
Priority: optional
Maintainer: Thomas Goirand <[email protected]>
-Build-Depends: debhelper (>= 7), python
+Build-Depends: debhelper (>= 7)
Standards-Version: 3.9.2
Vcs-Browser: http://git.debian.org/?p=users/zigo/libnatpmp.git
Vcs-Git: http://git.debian.org/git/users/zigo/libnatpmp.git
@@ -10,10 +10,8 @@ Homepage: http://miniupnp.free.fr/
Package: libnatpmp1
Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, python
-Breaks: libnatpmp0
-Replaces: libnatpmp0
-Suggests: minissdpd
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Suggests: natpmp-utils, minissdpd
Description: portable and fully compliant implementation of NAT-PMP
NAT-PMP is the direct concurrent to the UPnP IGD specification. It is
providing a way to do NAT traversal. It is part of the Bonjour protocol
@@ -32,8 +30,7 @@ Description: portable and fully compliant implementation of NAT-PMP
Package: libnatpmp-dev
Architecture: any
Section: libdevel
-Depends: ${misc:Depends}, ${shlibs:Depends}, libnatpmp1 (= ${binary:Version}), python
-Replaces: libnatpmp0
+Depends: ${misc:Depends}, libnatpmp1 (= ${binary:Version})
Description: portable and fully compliant implementation of NAT-PMP (dev files)
NAT-PMP is the direct concurrent to the UPnP IGD specification. It is
providing a way to do NAT traversal. It is part of the Bonjour protocol
@@ -47,12 +44,12 @@ Description: portable and fully compliant implementation of NAT-PMP (dev files)
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.
.
- This package contains development files needed to build using libnatpmp
+ This package contains development files needed to build using libnatpmp.
Package: natpmp-utils
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
-Replaces: libnatpmp0 (<= 20110808-2)
+Replaces: libnatpmp0, libnatpmp1 (<= 20110808-2)
Description: portable and fully compliant implementation of NAT-PMP (userland tool)
NAT-PMP is the direct concurrent to the UPnP IGD specification. It is
providing a way to do NAT traversal. It is part of the Bonjour protocol
diff --git a/debian/libnatpmp-dev.install b/debian/libnatpmp-dev.install
new file mode 100644
index 0000000..a204739
--- /dev/null
+++ b/debian/libnatpmp-dev.install
@@ -0,0 +1,3 @@
+usr/include
+usr/lib/libnatpmp*.so
+usr/lib/libnatpmp*.a
diff --git a/debian/libnatpmp1.install b/debian/libnatpmp1.install
new file mode 100644
index 0000000..2e3efc4
--- /dev/null
+++ b/debian/libnatpmp1.install
@@ -0,0 +1 @@
+usr/lib/libnatpmp*.so.*
diff --git a/debian/libnatpmp1.shlibs b/debian/libnatpmp1.shlibs
deleted file mode 100644
index 94757ab..0000000
--- a/debian/libnatpmp1.shlibs
+++ /dev/null
@@ -1 +0,0 @@
-libnatpmp 1 libnatpmp1
diff --git a/debian/manpages b/debian/manpages
deleted file mode 100644
index 25a3d1e..0000000
--- a/debian/manpages
+++ /dev/null
@@ -1 +0,0 @@
-natpmpc.1
diff --git a/debian/natpmp-utils.install b/debian/natpmp-utils.install
new file mode 100644
index 0000000..e772481
--- /dev/null
+++ b/debian/natpmp-utils.install
@@ -0,0 +1 @@
+usr/bin
diff --git a/debian/natpmp-utils.manpages b/debian/natpmp-utils.manpages
new file mode 100644
index 0000000..25a3d1e
--- /dev/null
+++ b/debian/natpmp-utils.manpages
@@ -0,0 +1 @@
+natpmpc.1
diff --git a/debian/rules b/debian/rules
index 3e6b7bf..5fd2be1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -28,24 +28,17 @@ install: build
dh_testdir
dh_testroot
dh_prep
- $(MAKE) install PREFIX=$(CURDIR)/debian/libnatpmp1
- # Move the development files in its corresponding separate package folder.
- mkdir -p $(CURDIR)/debian/libnatpmp-dev/usr
- mv $(CURDIR)/debian/libnatpmp1/usr/include $(CURDIR)/debian/libnatpmp-dev/usr
- mkdir -p $(CURDIR)/debian/libnatpmp-dev/usr/lib
- mv $(CURDIR)/debian/libnatpmp1/usr/lib/libnatpmp.so $(CURDIR)/debian/libnatpmp-dev/usr/lib
- mv $(CURDIR)/debian/libnatpmp1/usr/lib/libnatpmp.a $(CURDIR)/debian/libnatpmp-dev/usr/lib
- mkdir -p $(CURDIR)/debian/lnatpmp-utils/usr
- mv $(CURDIR)/debian/libnatpmp1/usr/bin $(CURDIR)/debian/lnatpmp-utils/usr
+ $(MAKE) install PREFIX=$(CURDIR)/debian/tmp
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
- dh_installchangelogs Changelog.txt
- dh_installdocs
+ dh_installdocs --link-doc=libnatpmp1
+ dh_installchangelogs
dh_installman
+ dh_install
dh_strip
dh_compress
dh_makeshlibs