[libsnl] 02/02: Initial debianization
Wolfgang Fütterer
wlfuetter-guest at moszumanska.debian.org
Thu Mar 26 11:03:26 UTC 2015
This is an automated email from the git hooks/post-receive script.
wlfuetter-guest pushed a commit to branch master
in repository libsnl.
commit c9c3e30260c812dde96f6c676d4fba8b157c7601
Author: Wolfgang Fuetterer <debian at wlf-online.de>
Date: Thu Mar 12 14:43:34 2015 +0100
Initial debianization
---
debian/README.source | 7 +++++
debian/changelog | 5 ++++
debian/compat | 1 +
debian/control | 28 ++++++++++++++++++
debian/copyright | 41 ++++++++++++++++++++++++++
debian/libsnl-dev.dirs | 2 ++
debian/libsnl-dev.install | 1 +
debian/libsnl-dev.links | 1 +
debian/libsnl0.dirs | 1 +
debian/libsnl0.install | 1 +
debian/libsnl0.links | 1 +
debian/libsnl_get-orig-source.sh | 43 ++++++++++++++++++++++++++++
debian/patches/0001-Debian-Build-Patch.patch | 37 ++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 16 +++++++++++
debian/source/format | 1 +
debian/watch | 8 ++++++
17 files changed, 195 insertions(+)
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..a9cdcd2
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,7 @@
+libsnl for Debian
+-----------------
+
+The orig.tar file is generated from the svn-repository at sorceforge.
+The applied patches are from the CalculiX CrunchiX source.
+
+ -- Wolfgang Fuetterer <debian at wlf-online.de> Tue, 24 Feb 2015 14:03:53 +0100
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..e30ede3
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+libsnl (0.2.1.svn.18-1~1.gbp4ce5f1) UNRELEASED; urgency=medium
+
+ * Initial release (Closes: #xxxxxx)
+
+ -- Wolfgang Fuetterer <debian at wlf-online.de> Tue, 24 Feb 2015 14:03:53 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..9188ca4
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,28 @@
+Source: libsnl
+Priority: optional
+Maintainer: Wolfgang Fuetterer <debian at wlf-online.de>
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.6
+Section: libs
+Homepage: http://libsnl.sourceforge.net/
+#Vcs-Git: git://anonscm.debian.org/collab-maint/libsnl.git
+#Vcs-Browser: http://anonscm.debian.org/?p=collab-maint/libsnl.git;a=summary
+
+Package: libsnl-dev
+Section: libdevel
+Architecture: any
+Depends: libsnl0 (= ${binary:Version}), ${misc:Depends}
+Description: Simple Nurbs Library
+ libSNL is a library of routines used for the
+ manipulation of NURBS curves and surfaces.
+ .
+ This package contains files needed to develop programs using libsnl.
+
+Package: libsnl0
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Simple Nurbs Library
+ libSNL is a library of routines used for the
+ manipulation of NURBS curves and surfaces.
+ .
+ This package contains the libsnl shared libraries.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..a931c16
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,41 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: libsnl
+Source: http://libsnl.sourceforge.net
+
+Files: *
+Copyright: 2004 Scott Lanham
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+Files: debian/*
+Copyright: 2015 Wolfgang Fuetterer <debian at wlf-online.de>
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/debian/libsnl-dev.dirs b/debian/libsnl-dev.dirs
new file mode 100644
index 0000000..4418816
--- /dev/null
+++ b/debian/libsnl-dev.dirs
@@ -0,0 +1,2 @@
+usr/lib
+usr/include
diff --git a/debian/libsnl-dev.install b/debian/libsnl-dev.install
new file mode 100644
index 0000000..a06b202
--- /dev/null
+++ b/debian/libsnl-dev.install
@@ -0,0 +1 @@
+src/*.h /usr/include
diff --git a/debian/libsnl-dev.links b/debian/libsnl-dev.links
new file mode 100644
index 0000000..edc4acb
--- /dev/null
+++ b/debian/libsnl-dev.links
@@ -0,0 +1 @@
+usr/lib/libSNL.so.0 usr/lib/libSNL.so
diff --git a/debian/libsnl0.dirs b/debian/libsnl0.dirs
new file mode 100644
index 0000000..6845771
--- /dev/null
+++ b/debian/libsnl0.dirs
@@ -0,0 +1 @@
+usr/lib
diff --git a/debian/libsnl0.install b/debian/libsnl0.install
new file mode 100644
index 0000000..bb57e8f
--- /dev/null
+++ b/debian/libsnl0.install
@@ -0,0 +1 @@
+src/lib*.so.* /usr/lib
diff --git a/debian/libsnl0.links b/debian/libsnl0.links
new file mode 100644
index 0000000..f48740d
--- /dev/null
+++ b/debian/libsnl0.links
@@ -0,0 +1 @@
+usr/lib/libSNL.so.0.2 usr/lib/libSNL.so.0
diff --git a/debian/libsnl_get-orig-source.sh b/debian/libsnl_get-orig-source.sh
new file mode 100644
index 0000000..4e25f6b
--- /dev/null
+++ b/debian/libsnl_get-orig-source.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+# Examples of using:
+# ./libsnl_get-orig-source.sh
+# main ideas of this script was taken from elmerfem
+
+PACKAGE=libsnl
+SVN_REPO="http://svn.code.sf.net/p/libsnl/code/trunk"
+
+SVN_REVISION=$(svn log "${SVN_REPO}" | head -n2 |grep "r[0-9]\+" | sed -e "s/^r\([0-9]\+\).*$/\1/")
+if [ -z "${SVN_REVISION}" ]; then
+ echo "Failed to find last SVN revision."
+ exit 1
+fi
+
+echo "SVN_REVISION = ${SVN_REVISION}"
+
+CUR_MAJ_VERSION=$(curl "${SVN_REPO}/src/snlVersion.h" 2>&1 | grep "#define SNL_VERSION_MAJOR" | sed -e "s/^#define SNL_VERSION_MAJOR \(.\+\)\r$/\1/")
+CUR_MIN_VERSION=$(curl "${SVN_REPO}/src/snlVersion.h" 2>&1 | grep "#define SNL_VERSION_MINOR" | sed -e "s/^#define SNL_VERSION_MINOR \(.\+\)\r$/\1/")
+CUR_REL_VERSION=$(curl "${SVN_REPO}/src/snlVersion.h" 2>&1 | grep "#define SNL_VERSION_RELEASE" | sed -e "s/^#define SNL_VERSION_RELEASE \(.\+\)\r$/\1/")
+
+CUR_VERSION="${CUR_MAJ_VERSION}.${CUR_MIN_VERSION}.${CUR_REL_VERSION}"
+if [ -z "${CUR_VERSION}" ]; then
+ echo "Failed to define current version."
+ exit 1
+fi
+
+echo "CUR_VERSION = ${CUR_VERSION}"
+
+SRC_VERSION="${CUR_VERSION}.svn.${SVN_REVISION}"
+echo "SRC_VERSION = ${SRC_VERSION}"
+
+TARBALL="${PACKAGE}_${SRC_VERSION}.orig.tar.xz"
+rm -rf "${PACKAGE}-${SRC_VERSION}" "${TARBALL}"
+
+echo "Start svn export, this will take some time..."
+svn export -r ${SVN_REVISION} "${SVN_REPO}" "${PACKAGE}-${SRC_VERSION}" > svn-export.log || exit 1
+echo "svn export finished successfully."
+
+tar -cJf ${TARBALL} "${PACKAGE}-${SRC_VERSION}" || exit 1
+rm -rf "${PACKAGE}-${SRC_VERSION}" svn-export.log
+
+echo "${TARBALL} was created."
diff --git a/debian/patches/0001-Debian-Build-Patch.patch b/debian/patches/0001-Debian-Build-Patch.patch
new file mode 100644
index 0000000..9b10eef
--- /dev/null
+++ b/debian/patches/0001-Debian-Build-Patch.patch
@@ -0,0 +1,37 @@
+From: Wolfgang Fuetterer <debian at wlf-online.de>
+Date: Fri, 13 Mar 2015 08:03:23 +0100
+Subject: Debian Build Patch Adjust makefile to use general flags from rules
+
+---
+ src/makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/makefile b/src/makefile
+index 12161e6..4af8169 100644
+--- a/src/makefile
++++ b/src/makefile
+@@ -18,14 +18,14 @@ libName = libSNL.so.0.2
+ export cflags = -Wall -fPIC -g
+ export cname = g++
+
+-CXXFLAGS := $(cflags)
+-CFLAGS := $(cflags)
++CXXFLAGS += $(cflags)
++CFLAGS += $(cflags)
+
+ libSNL: $(objFiles)
+ @ echo
+ @ echo "*** Building Shared Library ***"
+ @ echo
+- $(cname) $(cflags) -shared -o $(libName) $(objFiles)
++ $(cname) $(CFLAGS) -shared -Wl,-soname=libSNL.so.0 -o $(libName) $(objFiles)
+
+ include make.dep
+
+@@ -46,5 +46,5 @@ clean:
+ rm $(objFiles) make.dep $(libName) snlTest
+
+ test: snlTest.cpp
+- $(cname) $(cflags) snlTest.cpp -o snlTest $(objFiles)
++ $(cname) $(CFLAGS) snlTest.cpp -o snlTest $(objFiles)
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cba74e0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Debian-Build-Patch.patch
diff --git a/debian/rules b/debian/rules
new file mode 100644
index 0000000..3940f10
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,16 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+DH_VERBOSE = 1
+
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+%:
+ dh $@ -Dsrc
+
+override_dh_auto_build:
+ dh_auto_build -- CFLAGS="$(CFLAGS) $(CPPFLAGS) $(LDFLAGS)"
+
+override_dh_auto_clean:
+ rm -f src/*.o src/make.dep src/libSNL.so.0.2 src/snlTest
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..7cebd6f
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,8 @@
+# This file is useful only for checking current version. You can use script
+# debian/libsnl_get-orig-source.sh to get the orig tarball.
+# idea and structure of this watch file was thankfully stolen from elmerfem
+version=3
+opts=dversionmangle=s/.*svn.(.*).*/$1/ \
+ http://sourceforge.net/p/libsnl/code \
+ .*code.*\/([\d]+)\/.* \
+ debian debian/libsnl_get-orig-source.sh
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libsnl.git
More information about the debian-science-commits
mailing list