1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
#!/usr/bin/make -f
export JAVA_HOME=/usr/lib/jvm/default-java
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+).*,\1,p')
%:
dh $@ --with maven_repo_helper
override_dh_auto_configure:
# Link in jars from /usr/share/java rather
# than patching the build process
for pkg in `cat debian/build-jars`; \
do \
ln -sf `echo $$pkg | cut -d : -f 1` `echo $$pkg | cut -d : -f 2`; \
done
dh_auto_configure
override_dh_auto_build:
mkdir -p lucene/bin/lib/
cp /usr/share/java/javacc5.jar lucene/bin/lib/javacc.jar
mkdir -p lucene/site/build/site
ant -buildfile build.xml -Dversion=$(DEB_UPSTREAM_VERSION) get-maven-poms
ant -buildfile lucene/build.xml -propertyfile debian/ant.properties \
-Dversion=$(DEB_UPSTREAM_VERSION) javacc jar-core docs build-contrib
#ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
# ant -buildfile lucene/build.xml -propertyfile debian/ant.properties \
# -Dversion=$(DEB_UPSTREAM_VERSION) test-core test-contrib
# ant -buildfile solr/build.xml -propertyfile debian/ant.properties \
# -Dversion=$(DEB_UPSTREAM_VERSION) test-core
#endif
override_dh_auto_clean:
ant clean-jars
# breaks if patches not applied
ant -buildfile lucene/build.xml clean-javacc || true
find . -name "*.jar" -type l -delete || true
find . -name "pom.xml" -type f -delete || true
rm -f debian/liblucene3-java.poms
rm -rf lucene/site/build/site
dh_auto_clean
override_dh_auto_install:
sed -e "s|__VERSION__|$(DEB_UPSTREAM_VERSION)|g" \
< debian/liblucene3-java.poms.in > debian/liblucene3-java.poms
dh_auto_install
CORE_JAR=debian/liblucene3-java/usr/share/java/lucene3-core-*.jar
ANALYZERS_JAR=debian/liblucene3-contrib-java/usr/share/java/lucene3-analyzers-*.jar
override_mh_install:
mh_install
bnd wrap --properties debian/lucene3-core.bnd --output $(CORE_JAR).tmp $(CORE_JAR)
bnd wrap --properties debian/lucene3-analyzers.bnd --output $(ANALYZERS_JAR).tmp $(ANALYZERS_JAR)
mv $(CORE_JAR).tmp $(CORE_JAR)
mv $(ANALYZERS_JAR).tmp $(ANALYZERS_JAR)
override_dh_installchangelogs:
dh_installchangelogs -pliblucene3-java lucene/CHANGES.txt
dh_installchangelogs
|