[netty-tcnative] 01/02: Initial packaging
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Sun Aug 2 21:22:01 UTC 2015
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository netty-tcnative.
commit 357de7c079b69a2840c1d232616d1d263f8db41b
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Sun Aug 2 23:17:49 2015 +0200
Initial packaging
---
debian/README.source | 9 ++
debian/changelog | 5 +
debian/compat | 1 +
debian/control | 50 ++++++++
debian/copyright | 22 ++++
debian/libnetty-tcnative-java.poms | 28 +++++
debian/libnetty-tcnative-jni.lintian-overrides | 1 +
debian/maven.ignoreRules | 6 +
debian/maven.properties | 4 +
debian/maven.rules | 2 +
debian/native-build/Makefile.am | 53 ++++++++
debian/native-build/libnetty-tcnative.la | 24 ++++
debian/native-build/m4/jni.m4 | 163 +++++++++++++++++++++++++
debian/rules | 22 ++++
debian/source/format | 1 +
debian/source/lintian-overrides | 1 +
debian/watch | 2 +
17 files changed, 394 insertions(+)
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..998743e
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,9 @@
+Information about netty-tcnative
+--------------------------------
+
+This package was debianized using the mh_make command
+from the maven-debian-helper package.
+
+The build system uses Maven but prevents it from downloading
+anything from the Internet, making the build compliant with
+the Debian policy.
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..7117bc3
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+netty-tcnative (1.1.33.Fork4-1) unstable; urgency=medium
+
+ * Initial release (Closes: #794368)
+
+ -- Emmanuel Bourg <ebourg at apache.org> Sun, 02 Aug 2015 23:17:44 +0200
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..73b0cd3
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,50 @@
+Source: netty-tcnative
+Section: java
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
+Uploaders: Emmanuel Bourg <ebourg at apache.org>
+Build-Depends: automake,
+ cdbs,
+ debhelper (>= 9),
+ default-jdk,
+ hardening-wrapper,
+ libapr1-dev,
+ libssl-dev,
+ libtool,
+ maven-debian-helper (>= 1.5)
+Build-Depends-Indep: libmaven-antrun-plugin-java, libmaven-bundle-plugin-java
+Standards-Version: 3.9.6
+Vcs-Git: git://anonscm.debian.org/pkg-java/netty-tcnative.git
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/netty-tcnative.git
+Homepage: https://github.com/netty/netty-tcnative/
+
+Package: libnetty-tcnative-java
+Architecture: all
+Depends: libnetty-tcnative-jni (>= ${source:Version}),
+ ${maven:Depends},
+ ${misc:Depends}
+Suggests: ${maven:OptionalDepends}
+Description: Tomcat native fork for Netty
+ netty-tcnative is a fork of Tomcat Native, the native interface used by Tomcat
+ to leverage the Apache Portable Runtime and provide superior scalability,
+ performance, and better integration with native server technologies.
+ .
+ netty-tcnative includes a set of changes contributed by Twitter, Inc, such as:
+ * Simplified distribution and linkage of native library
+ * Complete mavenization of the project
+ * Improved OpenSSL support
+
+Package: libnetty-tcnative-jni
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Tomcat native fork for Netty (JNI library)
+ netty-tcnative is a fork of Tomcat Native, the native interface used by Tomcat
+ to leverage the Apache Portable Runtime and provide superior scalability,
+ performance, and better integration with native server technologies.
+ .
+ netty-tcnative includes a set of changes contributed by Twitter, Inc, such as:
+ * Simplified distribution and linkage of native library
+ * Complete mavenization of the project
+ * Improved OpenSSL support
+ .
+ This package contains the JNI library.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..b86b516
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,22 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Netty Tomcat Native
+Source: https://github.com/netty/netty-tcnative/
+
+Files: *
+Copyright: 2004-2014, The Apache Software Foundation
+ 2014, The Netty Project
+License: Apache-2.0
+
+Files: debian/*
+Copyright: 2015, Emmanuel Bourg <ebourg at apache.org>
+License: Apache-2.0
+
+Files: debian/native-build/m4/jni.m4
+Copyright: 2009-2011, FuseSource Corp.
+License: Apache-2.0
+Comment:
+ This file comes from the hawtjni package.
+
+License: Apache-2.0
+ On Debian systems, the full text of the Apache-2.0 license
+ can be found in the file '/usr/share/common-licenses/Apache-2.0'
diff --git a/debian/libnetty-tcnative-java.poms b/debian/libnetty-tcnative-java.poms
new file mode 100644
index 0000000..8545d14
--- /dev/null
+++ b/debian/libnetty-tcnative-java.poms
@@ -0,0 +1,28 @@
+# List of POM files for the package
+# Format of this file is:
+# <path to pom file> [option]*
+# where option can be:
+# --ignore: ignore this POM and its artifact if any
+# --ignore-pom: don't install the POM. To use on POM files that are created
+# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
+# --no-parent: remove the <parent> tag from the POM
+# --package=<package>: an alternative package to use when installing this POM
+# and its artifact
+# --has-package-version: to indicate that the original version of the POM is the same as the upstream part
+# of the version for the package.
+# --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
+# during a clean operation with mh_cleanpom or mh_installpom
+# --artifact=<path>: path to the build artifact associated with this POM,
+# it will be installed when using the command mh_install. [mh_install]
+# --java-lib: install the jar into /usr/share/java to comply with Debian
+# packaging guidelines
+# --usj-name=<name>: name to use when installing the library in /usr/share/java
+# --usj-version=<version>: version to use when installing the library in /usr/share/java
+# --no-usj-versionless: don't install the versionless link in /usr/share/java
+# --dest-jar=<path>: the destination for the real jar.
+# It will be installed with mh_install. [mh_install]
+# --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
+# --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
+# Empty by default. [mh_install]
+#
+pom.xml --no-parent
diff --git a/debian/libnetty-tcnative-jni.lintian-overrides b/debian/libnetty-tcnative-jni.lintian-overrides
new file mode 100644
index 0000000..4c983ff
--- /dev/null
+++ b/debian/libnetty-tcnative-jni.lintian-overrides
@@ -0,0 +1 @@
+pkg-has-shlibs-control-file-but-no-actual-shared-libs
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..d0f7d4b
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,6 @@
+
+kr.motd.maven os-maven-plugin * * * *
+org.apache.maven.plugins maven-antrun-plugin * * * *
+org.apache.maven.plugins maven-enforcer-plugin * * * *
+org.apache.maven.plugins maven-release-plugin * * * *
+org.fusesource.hawtjni maven-hawtjni-plugin * * * *
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..7c29bd7
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,4 @@
+# Include here properties to pass to Maven during the build.
+# For example:
+# maven.test.skip=true
+
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..4e5def9
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,2 @@
+
+io.netty netty-tcnative jar s/.*/debian/ * *
diff --git a/debian/native-build/Makefile.am b/debian/native-build/Makefile.am
new file mode 100644
index 0000000..7b35842
--- /dev/null
+++ b/debian/native-build/Makefile.am
@@ -0,0 +1,53 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+ACLOCAL_AMFLAGS = -I m4
+
+lib_LTLIBRARIES = libnetty-tcnative.la
+# libnetty_tcnative_la_CFLAGS =
+#libnetty_tcnative_la_LDFLAGS =
+
+libnetty_tcnative_la_SOURCES = src/sslinfo.c\
+ src/shm.c\
+ src/misc.c\
+ src/dir.c\
+ src/lock.c\
+ src/stdlib.c\
+ src/multicast.c\
+ src/os_win32_system.c\
+ src/network.c\
+ src/bb.c\
+ src/os.c\
+ src/file.c\
+ src/address.c\
+ src/user.c\
+ src/thread.c\
+ src/error.c\
+ src/proc.c\
+ src/poll.c\
+ src/sslcontext.c\
+ src/ssl.c\
+ src/sslutils.c\
+ src/sslnetwork.c\
+ src/os_win32_ntpipe.c\
+ src/mmap.c\
+ src/info.c\
+ src/os_win32_registry.c\
+ src/jnilib.c\
+ src/pool.c\
+ src/os_unix_uxpipe.c\
+ src/os_unix_system.c
diff --git a/debian/native-build/libnetty-tcnative.la b/debian/native-build/libnetty-tcnative.la
new file mode 100644
index 0000000..574f216
--- /dev/null
+++ b/debian/native-build/libnetty-tcnative.la
@@ -0,0 +1,24 @@
+# libnetty-tcnative.la - a libtool library file
+
+# The name that we can dlopen(3).
+dlname='libnetty-tcnative- at VERSION@.so'
+
+# Names of this library.
+library_names='libnetty-tcnative- at VERSION@.so libnetty-tcnative.so'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=' -pthread'
+
+# Libraries that this one depends upon.
+dependency_libs=' -lssl -lcrypto -lapr'
+
+# Version information for libnetty-tcnative.
+current=0
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
diff --git a/debian/native-build/m4/jni.m4 b/debian/native-build/m4/jni.m4
new file mode 100644
index 0000000..f353919
--- /dev/null
+++ b/debian/native-build/m4/jni.m4
@@ -0,0 +1,163 @@
+dnl ---------------------------------------------------------------------------
+dnl Copyright (C) 2009-2011 FuseSource Corp.
+dnl http://fusesource.com
+dnl
+dnl Licensed under the Apache License, Version 2.0 (the "License");
+dnl you may not use this file except in compliance with the License.
+dnl You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+dnl ---------------------------------------------------------------------------
+dnl ---------------------------------------------------------------------------
+dnl SYNOPSIS:
+dnl
+dnl WITH_JNI_JDK()
+dnl
+dnl Adds the --with-jni-jdk=PATH option. If not provided, it searches
+dnl for the JDK in the default OS locations.
+dnl
+dnl This macro calls:
+dnl AC_SUBST(JNI_JDK)
+dnl AC_SUBST(JNI_EXTRA_CFLAGS)
+dnl AC_SUBST(JNI_EXTRA_LDFLAGS)
+dnl
+dnl AUTHOR: <a href="http://hiramchirino.com">Hiram Chrino</a>
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([WITH_JNI_JDK],
+[
+ AC_PREREQ([2.61])
+ AC_ARG_WITH(jni-jdk,
+ [AS_HELP_STRING([--with-jni-jdk=PATH],
+ [Location of the Java Development Kit. Defaults to your JAVA_HOME setting and falls back to where it is typically installed on your OS])],
+ [
+ if test "$withval" = "no" || test "$withval" = "yes"; then
+ AC_MSG_ERROR([--with-jni-jdk: PATH to JDK not supplied])
+ fi
+ CHECK_JNI_JDK([$withval], [], [AC_MSG_ERROR([JDK not found. Invalid --with-jni-jdk PATH])])
+ ],[
+
+ if test -n "$JAVA_HOME" ; then
+ AC_MSG_NOTICE([JAVA_HOME was set, checking to see if it's a JDK we can use...])
+ CHECK_JNI_JDK([$JAVA_HOME], [], [])
+ fi
+
+ __JNI_GUESS=`which javac`
+ AS_IF(test -z "$JNI_JDK" && test -n "$__JNI_GUESS", [
+ AC_MSG_NOTICE([javac was on your path, checking to see if it's part of a JDK we can use...])
+ # transitively resolve the symbolic links to javac
+ while file -h "$__JNI_GUESS" 2>/dev/null | grep " symbolic link to " >/dev/null; do
+ __JNI_LINK=$( file -h $__JNI_GUESS | sed 's/.*symbolic link to //' | sed "s/'$//" | sed 's/^`//' )
+ __JNI_GUESS=$(cd $(dirname $__JNI_GUESS); cd $(dirname $__JNI_LINK); echo "$(pwd)/$(basename $__JNI_LINK)")
+ done
+ # move 2 dirs up to the home dir...
+ __JNI_GUESS=$(dirname $(dirname $__JNI_GUESS))
+ CHECK_JNI_JDK([$__JNI_GUESS], [], [],[])
+ ],[])
+
+ AS_IF(test -z "$JNI_JDK", [
+ case "$host_os" in
+ darwin*) __JNI_GUESS="/System/Library/Frameworks/JavaVM.framework";;
+ *) __JNI_GUESS="/usr";;
+ esac
+ AC_MSG_NOTICE([Taking a guess as to where your OS installs the JDK by default...])
+ CHECK_JNI_JDK([$__JNI_GUESS], [], [AC_MSG_ERROR([JDK not found. Please use the --with-jni-jdk option])])
+ ],[])
+ ])
+])
+
+dnl ---------------------------------------------------------------------------
+dnl
+dnl JNI_CHECK_JDK_HOME(PATH, [ACTION-SUCCESS], [ACTION-FAILURE])
+dnl
+dnl Tests to see if the given path is a valid JDK home location with
+dnl with a JNI headers and library that can be compiled against.
+dnl
+dnl This macro calls:
+dnl
+dnl AC_SUBST(JNI_JDK)
+dnl AC_SUBST(JNI_EXTRA_CFLAGS)
+dnl AC_SUBST(JNI_EXTRA_LDFLAGS)
+dnl
+dnl AUTHOR: <a href="http://hiramchirino.com">Hiram Chrino</a>
+dnl ---------------------------------------------------------------------------
+AC_DEFUN([CHECK_JNI_JDK],[
+ AC_PREREQ([2.61])
+ __JNI_JDK_HOME="$1"
+ AC_MSG_CHECKING(if '$__JNI_JDK_HOME' is a JDK)
+
+ __JNI_INCLUDE="$__JNI_JDK_HOME/include"
+
+ # OSX had to be a little different.
+ AS_IF(test -r "$__JNI_JDK_HOME/Headers/jni.h",[
+ __JNI_INCLUDE="$__JNI_JDK_HOME/Headers"
+ ])
+
+ AS_IF(test -r "$__JNI_INCLUDE/jni.h",[
+
+ AS_IF(test -r "$__JNI_JDK_HOME/Headers/jni.h",[
+ __JNI_INCLUDE="$__JNI_JDK_HOME/Headers"
+ ])
+
+ # Also include the os specific include dirs in the JNI_CFLAGS
+ __JNI_CFLAGS="-I$__JNI_INCLUDE"
+ case "$host_os" in
+ bsdi*) __JNI_INCLUDE_EXTRAS="bsdos";;
+ linux*) __JNI_INCLUDE_EXTRAS="linux genunix";;
+ osf*) __JNI_INCLUDE_EXTRAS="alpha";;
+ solaris*) __JNI_INCLUDE_EXTRAS="solaris";;
+ mingw*) __JNI_INCLUDE_EXTRAS="win32";;
+ cygwin*) __JNI_INCLUDE_EXTRAS="win32";;
+ darwin*) __JNI_INCLUDE_EXTRAS="darwin";;
+ *) __JNI_INCLUDE_EXTRAS="genunix";;
+ esac
+
+ for f in $__JNI_INCLUDE_EXTRAS ; do
+ if test -d "$__JNI_INCLUDE/$f"; then
+ __JNI_CFLAGS="$__JNI_CFLAGS -I$__JNI_INCLUDE/$f"
+ fi
+ done
+
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $__JNI_CFLAGS"
+ JNI_VERSION="1_2"
+ AC_LANG_PUSH(C)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[@%:@include <jni.h>]],[[
+ #ifndef JNI_VERSION_$JNI_VERSION
+ # error JNI version $JNI_VERSION is not supported.
+ #endif
+ ]])
+ ],[
+
+ JNI_JDK=$"$__JNI_JDK_HOME"
+ JNI_EXTRA_CFLAGS="$__JNI_CFLAGS"
+ AC_SUBST(JNI_JDK)
+ AC_SUBST(JNI_EXTRA_CFLAGS)
+ case $host_os in
+ darwin*)
+ JNI_EXTRA_LDFLAGS="-shrext .jnilib -dynamiclib" ;;
+ esac
+ AC_SUBST(JNI_EXTRA_LDFLAGS)
+
+
+ AC_MSG_RESULT([yes])
+ $2
+ ],[
+ AC_MSG_RESULT([no])
+ $3
+ ])
+ AC_LANG_POP()
+ CPPFLAGS="$saved_CPPFLAGS"
+ ],[
+ AC_MSG_RESULT([no])
+ $3
+ ])
+])
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ca794f8
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,22 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/maven.mk
+
+JAVA_HOME := /usr/lib/jvm/default-java
+
+export DEB_BUILD_HARDENING=1
+
+common-build-arch::
+ mkdir -p target/native-build/src
+ cp -Rvp src/main/native-package/* target/native-build/
+ cp -Rvp src/main/c/* target/native-build/src/
+ cp -Rvp debian/native-build/* target/native-build/
+ cd target/native-build/ ; autoreconf --force --install -I m4 ; ./configure ; make
+
+common-install-arch::
+ mv target/native-build/.libs/libnetty-tcnative- at VERSION@.so target/native-build/.libs/libnetty-tcnative.so
+ dh_install -p libnetty-tcnative-jni target/native-build/.libs/libnetty-tcnative.so usr/lib/${DEB_HOST_MULTIARCH}/jni
+
+get-orig-source:
+ uscan --download-current-version --force-download --no-symlink
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/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..748fa14
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1 @@
+build-depends-on-obsolete-package build-depends: hardening-wrapper*
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..5ef652b
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+https://github.com/netty/netty-tcnative/tags .*/netty-tcnative-(.*).tar.gz
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/netty-tcnative.git
More information about the pkg-java-commits
mailing list