This is an automated email from the git hooks/post-receive script. seamlik-guest pushed a commit to branch master in repository libnative-platform-java.
commit 286e68dbd57b0a05a2cfb0f04c4a326006223b7c Author: Kai-Chung Yan (殷啟聰) <[email protected]> Date: Thu Oct 27 16:53:29 2016 +0800 Use gradle-debian-helper to build this package --- debian/control | 1 + debian/libnative-platform-java.poms | 2 +- debian/libnative-platform-jni.install | 3 +- debian/native-platform.pom | 15 ---- debian/patches/build_scripts.patch | 153 ++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + debian/rules | 7 +- 7 files changed, 163 insertions(+), 19 deletions(-) diff --git a/debian/control b/debian/control index be0689a..b5dcfb7 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,7 @@ Build-Depends: ant, debhelper (>= 10), default-jdk-headless | default-jdk (>= 1:1.6), libjoptsimple-java, + gradle-debian-helper (>= 1.4~), libncurses5-dev, maven-repo-helper (>= 1.5~) Standards-Version: 3.9.8 diff --git a/debian/libnative-platform-java.poms b/debian/libnative-platform-java.poms index f925eb9..5e6447a 100644 --- a/debian/libnative-platform-java.poms +++ b/debian/libnative-platform-java.poms @@ -1 +1 @@ -debian/native-platform.pom --has-package-version --artifact=build/native-platform.jar --java-lib +build/debian/native-platform.pom --artifact=build/libs/native-platform-*.jar --java-lib diff --git a/debian/libnative-platform-jni.install b/debian/libnative-platform-jni.install index 3e94c0b..dd2192e 100644 --- a/debian/libnative-platform-jni.install +++ b/debian/libnative-platform-jni.install @@ -1 +1,2 @@ -build/binaries/*.so /usr/lib/jni/ \ No newline at end of file +build/libs/nativePlatform/shared/*.so usr/lib/jni +build/libs/nativePlatformCurses/shared/*.so usr/lib/jni \ No newline at end of file diff --git a/debian/native-platform.pom b/debian/native-platform.pom deleted file mode 100644 index 46d71bf..0000000 --- a/debian/native-platform.pom +++ /dev/null @@ -1,15 +0,0 @@ -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <groupId>net.rubygrapefruit</groupId> - <artifactId>native-platform</artifactId> - <version>0.10</version> - <dependencies> - <dependency> - <groupId>org.spockframework</groupId> - <artifactId>spock-core</artifactId> - <version>0.6-groovy-1.8</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> diff --git a/debian/patches/build_scripts.patch b/debian/patches/build_scripts.patch new file mode 100644 index 0000000..c548a41 --- /dev/null +++ b/debian/patches/build_scripts.patch @@ -0,0 +1,153 @@ +Description: Modify the build scipts for being built in Debian +Author: Kai-Chung Yan () +Last-Update: 2016-10-27 +Forwarded: not-needed +--- a/build.gradle ++++ b/build.gradle +@@ -32,9 +32,6 @@ + repositories { + mavenDeployer { + if (project.hasProperty('release')) { +- repository(url: uri("https://gradle.artifactoryonline.com/gradle/libs-releases-local")) { +- authentication(userName: artifactoryUserName, password: artifactoryPassword) +- } + } else if (project.hasProperty('snapshot')) { + repository(url: uri("https://gradle.artifactoryonline.com/gradle/libs-snapshots-local")) { + authentication(userName: artifactoryUserName, password: artifactoryPassword) +@@ -90,48 +87,24 @@ + def deployer = uploadJni.repositories.mavenDeployer + + model { ++ /* + platforms { +- osx_i386 { +- architecture "i386" +- operatingSystem "osx" +- } +- osx_amd64 { +- architecture "amd64" +- operatingSystem "osx" +- } +- linux_i386 { +- architecture "i386" +- operatingSystem "linux" +- } +- linux_amd64 { +- architecture "amd64" +- operatingSystem "linux" +- } +- windows_i386 { +- architecture "i386" +- operatingSystem "windows" +- } +- windows_amd64 { +- architecture "amd64" +- operatingSystem "windows" +- } +- freebsd_i386 { +- architecture "i386" +- operatingSystem "freebsd" +- } +- freebsd_amd64 { +- architecture "amd64" +- operatingSystem "freebsd" ++ linux { ++ architecture "${"dpkg-architecture --query DEB_HOST_ARCH".execute().text}" ++ operatingSystem 'linux' + } + } ++ */ + + components { + nativePlatform(NativeLibrarySpec) { + baseName 'native-platform' + // TODO - this should be the default. Figure out why this is not working ++ /* + $.platforms.each { p -> + targetPlatform p.name + } ++ */ + sources { + cpp { + source.srcDirs = ['src/shared/cpp', 'src/main/cpp'] +@@ -142,11 +115,13 @@ + + nativePlatformCurses(NativeLibrarySpec) { + baseName 'native-platform-curses' ++ /* + $.platforms.each { p -> + if (!p.operatingSystem.windows) { + targetPlatform p.name + } + } ++ */ + sources { + cpp { + source.srcDirs = ['src/shared/cpp', 'src/curses/cpp'] +@@ -181,6 +156,15 @@ + tasks.withType(CppCompile) { task -> + task.dependsOn project.tasks.nativeHeaders + } ++ "${"dpkg-buildflags --get CXXFLAGS".execute().text}".split().each { ++ cppCompiler.args it ++ } ++ "${"dpkg-buildflags --get CPPFLAGS".execute().text}".split().each { ++ cppCompiler.args it ++ } ++ "${"dpkg-buildflags --get LDFLAGS".execute().text}".split().each { ++ linker.args it ++ } + } + + // Using internal class here to make this simple +@@ -190,43 +174,16 @@ + if (!buildable) { + return + } +- +- if (targetPlatform.operatingSystem.name in ['linux', 'freebsd'] && targetPlatform.architecture != arch) { +- // Native plugins don't detect whether multilib support is available or not. Assume not for now +- return +- } +- +- def variantName = targetPlatform.name.replace('_', '-') +- def taskName = "jar-${variantName}" +- def nativeJar = project.tasks.findByName(taskName) +- if (nativeJar == null) { +- nativeJar = project.tasks.create(taskName, Jar) { +- baseName = "native-platform-$variantName" +- } +- artifacts { +- jni nativeJar +- runtime nativeJar +- } +- def jniPom = deployer.addFilter(variantName) { artifact, file -> +- return file == nativeJar.archivePath +- } +- jniPom.groupId = project.group +- jniPom.artifactId = nativeJar.baseName +- jniPom.version = project.version +- jniPom.scopeMappings.mappings.clear() +- } +- +- binary.tasks.withType(LinkSharedLibrary) { builderTask -> +- nativeJar.into("net/rubygrapefruit/platform/$variantName") { from builderTask.outputFile } +- nativeJar.dependsOn builderTask +- } +- project.tasks.test { +- dependsOn nativeJar +- classpath.from nativeJar +- } + } + } + } ++/* ++ toolChains { ++ gcc(Gcc) { ++ path '/usr/bin/c++' ++ } ++ } ++ */ + } + + javadoc { diff --git a/debian/patches/series b/debian/patches/series index b9722fa..b8bf22f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ native_locator_usr_lib_first.patch libname.diff +build_scripts.patch diff --git a/debian/rules b/debian/rules index 2cf53eb..8eba76f 100755 --- a/debian/rules +++ b/debian/rules @@ -6,12 +6,15 @@ DEB_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p') DEB_DIR=libnative-platform-java-$(DEB_VERSION) VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*[+~]git([0-9a-z]+).*,\1,p') INDEP_DIR := net/rubygrapefruit/native-platform +export DEB_CFLAGS_MAINT_APPEND = -fPIC +export DEB_LDFLAGS_MAINT_APPEND = -fPIC %: - dh $@ + dh $@ --buildsystem=gradle override_dh_auto_build: - make -f debian/Makefile + dh_auto_build -- assemble nativePlatformSharedLibrary nativePlatformCursesSharedLibrary \ + --project-prop release -x :testApp:assemble override_dh_auto_clean: dh_auto_clean -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libnative-platform-java.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

