Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 SVNREPOscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/SVNREPO. := https://josm.openstreetmap.de/svn/trunk
4 SVNI18NREPOscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/SVNI18NREPO. := https://josm.openstreetmap.de/osmsvn/applications/editors/josm/i18n
5
6 DATEscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DATE. := $(shellscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/shell. date +%Y%m%d)
7 ifdef SVNREV
8 VERSIONscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/VERSION. := 0.0.svn${SVNREVscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/SVNREV.}
9 else
10 VERSIONscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/VERSION. := 0.0.0.${DATEscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DATE.}
11 endif
12 DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR. := ../tarballs/josm-${VERSIONscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/VERSION.}
13 DESTTGZscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTTGZ. := ../tarballs/josm_${VERSIONscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/VERSION.}+dfsg.orig.tar.gz
14
15 include /usr/share/dpkg/pkg-info.mk
16
17 DEB_UPSTREAM_VERSIONscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DEB_UPSTREAM_VERSION. := $(shellscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/shell. echo $(DEB_VERSIONscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DEB_VERSION.) | cut -d- -f1)
18
19 %scip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/`%`().:
20 dh $@
21
22 override_dh_auto_buildscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/override_dh_auto_build().:
23 # Move translation causing build failure out of the way
24 mv i18n/po/[email protected] .
25
26 dh_auto_buildscip-debian debian debhelper . dh_auto_build(). -- -v -d -Ddebian.version=${DEB_VERSIONscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DEB_VERSION.} dist
27
28 mv [email protected] i18n/po/
29
30 execute_after_dh_auto_installscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/execute_after_dh_auto_install().:
31 install -m 644 $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/dist/josm-custom.jar $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/josm/josm-${DEB_UPSTREAM_VERSIONscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DEB_UPSTREAM_VERSION.}.jar
32 dh_linkscip-debian debian debhelper . dh_link(). usr/share/josm/josm-${DEB_UPSTREAM_VERSIONscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DEB_UPSTREAM_VERSION.}.jar usr/share/josm/josm.jar
33
34 install -m 755 $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/native/linux/tested/usr/bin/josm $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/bin/josm
35
36 install -d $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/etc/default
37 install -m 644 $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/native/linux/tested/etc/default/josm $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/etc/default/josm
38
39 for size in 512x512 256x256 192x192 128x128 96x96 80x80 72x72 64x64 48x48 42x42 40x40 36x36 32x32 24x24 22x22 16x16 8x8; do \
40 install -d $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/icons/hicolor/$${size}/apps ; \
41 install -m 644 $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/native/linux/tested/usr/share/icons/hicolor/$${size}/apps/org.openstreetmap.josm.png $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/icons/hicolor/$${size}/apps/org.openstreetmap.josm.png ; \
42 done
43 install -d $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/icons/hicolor/scalable/apps
44 install -m 644 $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/native/linux/tested/usr/share/icons/hicolor/scalable/apps/org.openstreetmap.josm.svg $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/icons/hicolor/scalable/apps/org.openstreetmap.josm.svg
45
46 install -m 644 $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/native/linux/tested/usr/share/pixmaps/org.openstreetmap.josm.png $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/pixmaps/org.openstreetmap.josm.png
47 install -m 644 $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/native/linux/tested/usr/share/applications/org.openstreetmap.josm.desktop $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/applications/org.openstreetmap.josm.desktop
48 install -m 644 $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/native/linux/tested/usr/share/metainfo/org.openstreetmap.josm.appdata.xml $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/metainfo/org.openstreetmap.josm.appdata.xml
49
50 install -d $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/mime/packages
51 install -m 644 $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/native/linux/tested/usr/share/mime/packages/josm.xml $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/mime/packages
52
53 execute_after_dh_installscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/execute_after_dh_install().:
54 # remove *.lang files, since we ship them in josm-l10n
55 rm -rf $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/josm/data/*.lang
56
57 # remove executable bit
58 chmod a-x $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/josm/data/defaultpresets.xml
59
60 # Remove empty directories
61 find $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/josm/usr/share/josm/data -type d -empty -delete
62
63 # check font in SVG files
64 sh $(CURDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/CURDIR.)/debian/images-check.sh
65
66 get-orig-sourcescip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/get-orig-source().:
67 dh_testdirscip-debian debian debhelper . dh_testdir().
68 test -d ../tarballs/. || mkdir -p ../tarballs
69 @echo Downloading josm from ${SVNREPOscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/SVNREPO.}
70 svn export -r ${SVNREVscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/SVNREV.} ${SVNREPOscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/SVNREPO.} ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}
71 @echo Removing duplicated code
72 rm -rf ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/src/org/apache/commons/compress ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/src/org/apache/commons/logging
73 @echo Downloading source JAR
74 wget https://josm.openstreetmap.de/download/josm-snapshot-${SVNREVscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/SVNREV.}-sources.jar -O /tmp/josm-sources.jar
75 @echo Extracting sources from JAR
76 cd ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/src && jar -xf /tmp/josm-sources.jar ch/poole com/drew com/google com/kitfox jakarta/annotation jakarta/json org/apache/commons org/eclipse org/tukaani && cd $$OLDPWD
77 for i in `grep "Generated By:JavaCC:" ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/src/ch/poole -r | cut -d: -f1 | sort -u`; do \
78 rm -v "$$i"; \
79 done
80 cd ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/resources && jar -xf /tmp/josm-sources.jar META-INF/resources/webjars/tag2link && cd $$OLDPWD
81 find ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/resources/META-INF/resources/webjars/tag2link -type f -not -name index.json -delete
82 @echo Downloading xmpcore source JAR
83 wget https://repo1.maven.org/maven2/com/adobe/xmp/xmpcore/6.1.10/xmpcore-6.1.10-sources.jar -O /tmp/xmpcore-sources.jar
84 @echo Extracting xmpcore sources from JAR
85 cd ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/src && jar -xf /tmp/xmpcore-sources.jar com/adobe && cd $$OLDPWD
86 @echo Downloading annotations source JAR
87 wget https://repo1.maven.org/maven2/org/jetbrains/annotations/24.0.1/annotations-24.0.1-sources.jar -O /tmp/annotations-sources.jar
88 @echo Extracting annotations sources from JAR
89 cd ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/src && jar -xf /tmp/annotations-sources.jar org/jetbrains && cd $$OLDPWD
90 @echo Downloading commons-io source JAR
91 wget https://repo1.maven.org/maven2/commons-io/commons-io/2.20.0/commons-io-2.20.0-sources.jar -O /tmp/commons-io-sources.jar
92 @echo Extracting commons-io sources from JAR
93 cd ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/src && jar -xf /tmp/commons-io-sources.jar org/apache && cd $$OLDPWD
94 @echo Downloading commons-lang3 source JAR
95 wget https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.16.0/commons-lang3-3.16.0-sources.jar -O /tmp/commons-lang3-sources.jar
96 @echo Extracting commons-lang3 sources from JAR
97 cd ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/src && jar -xf /tmp/commons-lang3-sources.jar org/apache && cd $$OLDPWD
98 @echo Fetching revision metadata
99 svn info --xml -r ${SVNREVscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/SVNREV.} ${SVNREPOscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/SVNREPO.} > ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/REVISION
100 @echo Fetching internalization data
101 svn export ${SVNI18NREPOscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/SVNI18NREPO.} ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/i18n
102 @echo Downloading translations from Launchpad
103 bzr export -v ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/i18n/po/ lp:~openstreetmap/josm/josm_trans/
104 @echo Stripping comments from translations to save some space in the tarball
105 for i in ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/i18n/po/josm/*.po; do \
106 grep -E -v "^#[:,\.]" $$i > ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/i18n/po/`basename $$i`; \
107 done
108 mv ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/i18n/po/josm/*.pot ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/i18n/po/
109 rm -rf ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/i18n/po/josm/
110 @echo Removing jar files
111 find ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.} -name "*.jar" -exec rm -v {} \;
112 @echo Removing nodist/images
113 rm -fr ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/nodist/images
114 @echo Removing other useless data
115 rm -fr ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/nodist/data/*.osm ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/nodist/data/*.gpx ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/nodist/data/*.jpg
116 @echo Removing non-free or autogenerated data
117 rm -fr ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/resources/data/*.lang
118 rm -fr ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/src/org/openstreetmap/josm/data/imagery/types/*
119 @echo Removing embedded code copy of jmapviewer
120 rm -fr ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/src/org/openstreetmap/gui/jmapviewer/
121 @echo Removing embedded fonts
122 rm -fr ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/resources/data/fonts/
123 @echo Removing OSX support
124 rm -fr ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/native/macosx/
125 @echo Removing Windows installer
126 rm -fr ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}/native/windows/
127 @echo Building snapshot tarball
128 tar czf ${DESTTGZscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTTGZ.} -C `dirname ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}` `basename ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}`
129 @echo Cleaning up
130 rm -rf ${DESTDIRscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTDIR.}
131 @echo Moving tarball to parent directory
132 mv -v ${DESTTGZscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/DESTTGZ.} ../
133 @echo Removing source JAR
134 rm -f /tmp/josm-sources.jar /tmp/xmpcore-sources.jar /tmp/annotations-sources.jar /tmp/commons-io-sources.jar /tmp/commons-lang3-sources.jar
135 @echo Removing tarballs directory
136 rmdir ../tarballs
137 @echo .
138 @echo To update debian/changelog type
139 @echo dch -v ${VERSIONscip-debian debian josm 0.0.svn19613+dfsg-1 josm/rules/VERSION.}+dfsg-1
140 @echo .