|
7 | 7 | # This has to be exported to make some magic below work.
|
8 | 8 | export DH_OPTIONS
|
9 | 9 |
|
| 10 | +# Enable hardening build flags |
| 11 | +export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 12 | + |
10 | 13 | # These are used for cross-compiling and for saving the configure script
|
11 | 14 | # from having to guess our platform (since we know it already)
|
12 | 15 | DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
@@ -252,6 +255,35 @@ endif
|
252 | 255 | override_dh_auto_install:
|
253 | 256 | dh_auto_install
|
254 | 257 |
|
| 258 | + # remove unwanted files |
| 259 | + $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/doc/api/installdox |
| 260 | + $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/doc/api/html/jquery.js |
| 261 | + $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/doc/api/jquery.js |
| 262 | + |
| 263 | + # replace leaflet and jquery urls |
| 264 | + perl -i -p \ |
| 265 | + -e 's#http://.*/leaflet.css#leaflet/leaflet.css#;s#http://.*/leaflet.js#leaflet/leaflet.js#;s#http://.*/jquery-.*.min.js#jquery-min.js#' \ |
| 266 | + $(CURDIR)/debian/tmp/usr/share/qgis/doc/developersmap.html |
| 267 | + |
| 268 | + # Use /usr/bin/python2.7 explicitly for Python Policy compliance |
| 269 | + perl -i -pe 's=#!/usr/bin/env python=#!/usr/bin/python2.7=;' $$(find debian/tmp -name "*.py") |
| 270 | + |
| 271 | + # Don't include a copy of the world.tif also included in osgearth-data |
| 272 | + $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/globe/world.tif |
| 273 | + |
| 274 | + # remove extra license files |
| 275 | + -find $(CURDIR)/debian/tmp/usr/share/qgis/resources/cpt-city-qgis-min/ -name COPYING.xml -delete |
| 276 | + $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/doc/LICENSE |
| 277 | + $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/python/plugins/db_manager/LICENSE |
| 278 | + $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/python/plugins/MetaSearch/LICENSE.txt |
| 279 | + |
| 280 | + # Man pages are installed by dh_installman |
| 281 | + $(RM) $(CURDIR)/debian/tmp/usr/man/man1/qgis.1 |
| 282 | + $(RM) $(CURDIR)/debian/tmp/usr/man/man1/qbrowser.1 |
| 283 | + |
| 284 | + # Don't ship srs.db, automatically updated in postinst with crssync |
| 285 | + mv $(CURDIR)/debian/tmp/usr/share/qgis/resources/srs.db $(CURDIR)/debian/tmp/usr/share/qgis/resources/srs-template.db |
| 286 | + |
255 | 287 | # Install menu pixmap
|
256 | 288 | install -o root -g root -d $(CURDIR)/debian/tmp/usr/share/pixmaps
|
257 | 289 | install -o root -g root -m 644 $(CURDIR)/images/icons/qgis_icon.svg $(CURDIR)/debian/tmp/usr/share/pixmaps/qgis.svg
|
@@ -307,34 +339,6 @@ override_dh_auto_install:
|
307 | 339 | install -o root -g root -m 755 $(CURDIR)/debian/qgis.sh $(CURDIR)/debian/qgis/usr/bin/qbrowser
|
308 | 340 |
|
309 | 341 | override_dh_install:
|
310 |
| - # Don't ship srs.db, automatically updated in postinst with crssync |
311 |
| - mv $(CURDIR)/debian/tmp/usr/share/qgis/resources/srs.db $(CURDIR)/debian/tmp/usr/share/qgis/resources/srs-template.db |
312 |
| - |
313 |
| - perl -i -pe 's=#!/usr/bin/env python=#!/usr/bin/python2.7=;' $$(find debian/tmp -name "*.py") |
314 |
| - |
315 |
| - # remove unwanted files |
316 |
| - $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/doc/api/installdox |
317 |
| - $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/doc/api/html/jquery.js |
318 |
| - $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/doc/api/jquery.js |
319 |
| - |
320 |
| - # replace leaflet and jquery urls |
321 |
| - perl -i -p \ |
322 |
| - -e 's#http://.*/leaflet.css#leaflet/leaflet.css#;s#http://.*/leaflet.js#leaflet/leaflet.js#;s#http://.*/jquery-.*.min.js#jquery-min.js#' \ |
323 |
| - $(CURDIR)/debian/tmp/usr/share/qgis/doc/developersmap.html |
324 |
| - |
325 |
| - # Don't include a copy of the world.tif also included in osgearth-data |
326 |
| - $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/globe/world.tif |
327 |
| - |
328 |
| - # remove extra license files |
329 |
| - -find $(CURDIR)/debian/tmp/usr/share/qgis/resources/cpt-city-qgis-min/ -name COPYING.xml -delete |
330 |
| - $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/doc/LICENSE |
331 |
| - $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/python/plugins/db_manager/LICENSE |
332 |
| - $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/python/plugins/MetaSearch/LICENSE.txt |
333 |
| - |
334 |
| - # Man pages are installed by dh_installman |
335 |
| - $(RM) $(CURDIR)/debian/tmp/usr/man/man1/qgis.1 |
336 |
| - $(RM) $(CURDIR)/debian/tmp/usr/man/man1/qbrowser.1 |
337 |
| - |
338 | 342 | dh_install --autodest --list-missing
|
339 | 343 |
|
340 | 344 | override_dh_installchangelogs:
|
|
0 commit comments