File: rules

package info (click to toggle)
lucene-solr 3.6.2+dfsg-22
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 91,288 kB
  • sloc: java: 465,555; xml: 24,956; ruby: 3,453; jsp: 2,637; sh: 1,660; python: 1,619; perl: 1,407; cpp: 305; makefile: 53
file content (76 lines) | stat: -rwxr-xr-x 2,752 bytes parent folder | download | duplicates (2)
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
65
66
67
68
69
70
71
72
73
74
75
76
#!/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/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
	ant -buildfile solr/contrib/dataimporthandler/build.xml \
		-propertyfile debian/ant.properties -Dversion=$(DEB_UPSTREAM_VERSION) dist
	ant -buildfile solr/build.xml -propertyfile debian/ant.properties \
		-Dversion=$(DEB_UPSTREAM_VERSION) dist-war

#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_fixperms:
	chmod 644 debian/solr-common/usr/share/solr/web/WEB-INF/weblogic.xml \
		debian/solr-common/etc/solr/conf/schema.xml \
		debian/solr-common/etc/solr/conf/solrconfig.xml \
		debian/solr-common/usr/share/solr/web/favicon.ico \
		debian/solr-common/usr/share/solr/web/admin/favicon.ico
	dh_fixperms

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 -plibsolr-java solr/CHANGES.txt
	dh_installchangelogs

get-orig-source:
	uscan --force-download --rename