[Pkg-awstats-commits] [SCM] awstats Debian packaging branch, master, updated. debian/6.9.dfsg-1-175-gb03d736
Jonas Smedegaard
dr at jones.dk
Fri Sep 4 15:15:00 UTC 2009
The following commit has been merged in the master branch:
commit 9241260c2b961be87e04810d4e8be05e9b763777
Author: Jonas Smedegaard <dr at jones.dk>
Date: Fri Sep 4 17:13:22 2009 +0200
Build java applet using Ant and in compliance with Debian Java Policy.
diff --git a/debian/awstats.install b/debian/awstats.install
index 9319508..b88f4c7 100644
--- a/debian/awstats.install
+++ b/debian/awstats.install
@@ -5,8 +5,6 @@ wwwroot/cgi-bin/awstats.pl usr/lib/cgi-bin/
wwwroot/cgi-bin/lang/* usr/share/awstats/lang/
wwwroot/cgi-bin/lib/* usr/share/awstats/lib/
wwwroot/cgi-bin/plugins/*.pm usr/share/awstats/plugins/
-wwwroot/classes/awgraphapplet.jar usr/share/awstats/classes/
-wwwroot/classes/src/AWGraphApplet.class usr/share/awstats/classes/
wwwroot/icon/* usr/share/awstats/icon/
debian/update.sh usr/share/awstats/tools/
tools/awstats_buildstaticpages.pl usr/share/awstats/tools/
diff --git a/debian/build.xml b/debian/build.xml
new file mode 100644
index 0000000..baabf0b
--- /dev/null
+++ b/debian/build.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="awgraphapplet" basedir="../wwwroot/classes" default="build">
+
+ <target name="init">
+ <property name="name" value="awgraphapplet"/>
+ <property name="version" value="0"/>
+ <property name="target.dir" value="."/>
+ <property name="debug" value="true"/>
+ </target>
+
+ <target name="all" depends="build,bin-jar"/>
+
+ <target name="dist" depends="clean,all" description="builds a distribution"/>
+
+ <target name="build" depends="compile" description="build binaries"/>
+
+ <target name="compile">
+ <javac srcdir="src" debug="${debug}"/>
+ </target>
+
+ <target name="clean" depends="init" description="clean up">
+ <delete>
+ <fileset dir="src" includes="*.class"/>
+ </delete>
+ <delete dir="${name}${version}"/>
+ </target>
+
+ <target name="bin-jar" depends="init,build" description="package binaries">
+ <jar jarfile="${target.dir}/${name}${version}.jar">
+ <fileset dir="src" includes="*.class"/>
+ </jar>
+ </target>
+
+</project>
diff --git a/debian/examples/apache.conf b/debian/examples/apache.conf
index 5ab8120..7614e52 100644
--- a/debian/examples/apache.conf
+++ b/debian/examples/apache.conf
@@ -23,21 +23,20 @@
# This provides worldwide access to everything below the directory
# Security concerns: none known
-<Directory /usr/share/awstats/classes>
+<Directory /usr/share/java/awstats>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
-
# This provides worldwide access to everything in the directory
# Security concerns: none known
Alias /awstats-icon/ /usr/share/awstats/icon/
# This provides worldwide access to everything in the directory
# Security concerns: none known
-Alias /awstatsclasses/ /usr/share/awstats/classes/
+Alias /awstatsclasses/ /usr/share/java/awstats/
# This (hopefully) enables _all_ CGI scripts in the default directory
# Security concerns: Are you sure _all_ CGI scripts are safe?
diff --git a/debian/rules b/debian/rules
index dcfbf56..2c3fbeb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,6 +23,7 @@ ifneq (,$(DEB_MAINTAINER_MODE))
DEB_COPYRIGHT_CHECK_STRICT = yes
DEB_AUTO_UPDATE_DEBIAN_CONTROL = yes
endif
+include /usr/share/cdbs/1/class/ant.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include debian/cdbs/1/rules/buildinfo.mk
@@ -42,9 +43,13 @@ awstats_example_scripts = $(wildcard tools/[^a]*.pl tools/awstats_[^b]*.pl) $(wi
DEB_INSTALL_EXAMPLES_awstats = $(awstats_example_scripts) debian/examples/apache.conf wwwroot/cgi-bin/awstats.model.conf wwwroot/cgi-bin/plugins/example/* wwwroot/css wwwroot/js tools/xslt
DEB_COMPRESS_EXCLUDE = $(notdir $(awstats_example_scripts)) awstats.ico
+JAVA_HOME = /usr/lib/jvm/default-java
+DEB_ANT_BUILDFILE = debian/build.xml
+DEB_ANT_BUILD_TARGET = bin-jar
+DEB_ANT_ARGS = -Dpackage=awgraphapplet -Dversion=$(DEB_NOEPOCH_VERSION)
+
pre-build::
(cd debian/icons && uudecode firefox.png.uu)
- (cd wwwroot/classes/src/ && perl Makefile.pl)
common-configure-indep::
# Use perl rather than a diff here, to make sure all relevant
@@ -71,20 +76,18 @@ common-configure-indep::
< wwwroot/cgi-bin/awstats.model.conf > debian/awstats.conf
clean::
- rm -f debian/awstats.conf debian/icons/firefox.png
- # remove rebuilt files since we neither want nor can ship binary diffs.
- rm -f wwwroot/classes/awgraphapplet.jar
- rm -f wwwroot/classes/src/AWGraphApplet.class
- # if we're working out of the pkg-awstats git tree, restore the
- # original files to keep git happy.
- [ ! -d .git ] || [ ! -x /usr/bin/git ] \
- || git checkout -f wwwroot/classes/awgraphapplet.jar
+ rm -f debian/awstats.conf debian/icons/firefox.png wwwroot/classes/awgraphapplet?*.jar
# Remove badly coded PDF, and .cvsignore
binary-post-install/awstats::
find $(DEB_DESTDIR) -type f -name *.pdf | xargs -r rm
find $(DEB_DESTDIR) -type f -name .cvsignore | xargs -r rm
+# Install java applet
+# TODO: use DEB_DH_INSTALL_ARGS_awstats when some day implemented in CDBS
+DEB_DH_LINK_awstats = usr/share/java/awstats/awgraphapplet$(VERSION).jar usr/share/java/awstats/awgraphapplet.jar
+binary-install/awstats:: DEB_DH_INSTALL_ARGS = wwwroot/classes/awgraphapplet$(DEB_NOEPOCH_VERSION).jar usr/share/java/awstats/
+
# Debian stores the GPL at one single spot
binary-post-install/awstats::
find $(DEB_DESTDIR) -name COPYING.TXT -o -name LICENSE.TXT | xargs -r rm
@@ -107,7 +110,7 @@ CDBS_RECOMMENDS := libnet-xwhois-perl
CDBS_SUGGESTS := apache2 | httpd, libnet-dns-perl, libnet-ip-perl, libgeo-ipfree-perl
# Needed by upstream build process
-CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), openjdk-6-jdk
+CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), ant, default-jdk
# Needed for our packaging
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), sharutils
--
awstats Debian packaging
More information about the Pkg-awstats-commits
mailing list