debian swirl logo

Back to the packages list libinline-java-perl

#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2012, Jonas Smedegaard 
# Description: Main Debian packaging script for Inline::Java
#
# This program 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, or (at your option)
# any later version.
#
# This program 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 .

include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/perl-makemaker.mk
include /usr/share/cdbs/1/rules/debhelper.mk

pkg = $(DEB_SOURCE_PACKAGE)

DEB_UPSTREAM_PACKAGE = Inline-Java
DEB_UPSTREAM_URL = http://www.cpan.org/modules/by-module/Inline
DEB_UPSTREAM_TARBALL_MD5 = 23f96c2ac4915302c3647c0abc92916f

# Needed both by upstream build and at runtime
deps = libinline-perl, default-jdk | java-compiler

# Needed by upstream build
b-depends = chrpath

CDBS_BUILD_DEPENDS += , $(deps), $(b-depends)
CDBS_DEPENDS_$(pkg) = $(deps)

export JAVA_HOME= /usr/lib/jvm/default-java

# Have testsuite use JNI
export PERL_INLINE_JAVA_JNI= 1

binary-post-install/$(pkg)::
		chrpath -d $(cdbs_curdestdir)usr/lib/perl5/auto/Inline/Java/JNI/JNI.so

binary-post-install/$(pkg)::
		mkdir -p $(cdbs_curdestdir)/usr/share/$(pkg)
		mv -t $(cdbs_curdestdir)/usr/share/$(pkg) \
			$(cdbs_curdestdir)/usr/lib/perl5/Inline/Java/*.jar
		ln -st $(cdbs_curdestdir)/usr/lib/perl5/Inline/Java \
			../../../../share/$(pkg)/InlineJavaServer.jar \
			../../../../share/$(pkg)/InlineJavaUser.jar

Builds:

libinline-java-perl
write perl classes in java