File: rules

package info (click to toggle)
eonasdan-bootstrap-datetimepicker 4.17.43-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,084 kB
  • ctags: 134
  • sloc: makefile: 45; xml: 12
file content (71 lines) | stat: -rwxr-xr-x 3,525 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
#!/usr/bin/make -f
%:
	dh $@

VERSION = $(shell dpkg-parsechangelog -SVersion | cut -d'-' -f 1)
define BANNER
/*! version : $(VERSION)
 =========================================================
 bootstrap-datetimejs
 https://github.com/Eonasdan/bootstrap-datetimepicker
 Copyright (c) 2015 Jonathan Peterson
 =========================================================
 */
/*
 The MIT License (MIT)

 Copyright (c) 2015 Jonathan Peterson

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 */
endef
export BANNER

override_dh_auto_clean:
	dh_clean
	# Remove preprocessed files
	rm -rf build/
	rm -rf src/nuget/
	rm -f *.css
	rm -f *.js
	# Remove docs directory for now, as there are number of references to prebuilt or downloaded files as:
	## source-contains-prebuilt-javascript-object docs/theme/js/prettify-1.0.min.js
	## privacy-breach-generic usr/share/doc/libjs-eonasdan-bootstrap-datetimepicker/docs/theme/base.html (https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js)
	## privacy-breach-generic usr/share/doc/libjs-eonasdan-bootstrap-datetimepicker/docs/theme/base.html (https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js)
	## privacy-breach-uses-embedded-file usr/share/doc/libjs-eonasdan-bootstrap-datetimepicker/docs/theme/base.html You may use libjs-jquery package. (//code.jquery.com/jquery-2.1.1.min.js)
	## privacy-breach-uses-embedded-file usr/share/doc/libjs-eonasdan-bootstrap-datetimepicker/docs/theme/base.html You may use libjs-bootstrap package. (//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js)
	## privacy-breach-generic usr/share/doc/libjs-eonasdan-bootstrap-datetimepicker/docs/theme/base.html (//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css)
	## as well as number of duplicated image files
	# To avoid bloating the depends of this very package it will finally be better to create a separate doc package
	rm -rf docs/
 

override_dh_auto_build:
	# grunt is not (yet) packaged (#673727), so we mimic the tasks
	# Grunt task uglify: Minify the js file
	uglifyjs --preamble "$$BANNER" -o bootstrap-datetimepicker.min.js src/js/bootstrap-datetimepicker.js

	# Grunt task less: Compile and compress the css files
	lessc --include-path=src:/usr/share/javascript/ src/less/bootstrap-datetimepicker-build.less bootstrap-datetimepicker.css 
	lessc -x --include-path=src:/usr/share/javascript/ src/less/bootstrap-datetimepicker-build.less bootstrap-datetimepicker.min.css 

override_dh_installdocs:
	# Don't install a duplicate changelog
	dh_installdocs -XChangeLog.md