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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Make sure no svn parts inside the deb
DH_ALWAYS_EXCLUDE=CVS:.svn
export DH_ALWAYS_EXCLUDE
# This has to be exported to make some magic below work.
export DH_OPTIONS
# .NOTPARALLEL:
configure: configure-stamp
configure-stamp:
mkdir -p $(CURDIR)/build/kicad
mkdir -p $(CURDIR)/build/bitmaps_png
cd $(CURDIR)/build/kicad && cmake \
-DDEFAULT_INSTALL_PATH=/usr -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad/usr -DKICAD_DEMOS=$(CURDIR)/debian/kicad-common/usr/share/doc/kicad/demos \
-DKICAD_TEMPLATE=$(CURDIR)/debian/kicad-common/usr/share/kicad/template/ ../../kicad \
-DBUILD_GITHUB_PLUGIN=ON -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON \
-LA -DKICAD_BUILD_VERSION=$(shell dpkg-parsechangelog -SVersion)
mkdir -p $(CURDIR)/build/kicad-doc
cd $(CURDIR)/build/kicad-doc && cmake ../../kicad-doc
mkdir -p $(CURDIR)/build/kicad-library
cd $(CURDIR)/build/kicad-library && cmake ../../kicad-library
mkdir -p $(CURDIR)/kicad/.downloads-by-cmake/
bzr whoami || bzr whoami "Kicad automatic <name@example.com>"
cp $(CURDIR)/boost_1_54_0.tar.bz2 $(CURDIR)/kicad/.downloads-by-cmake/
touch $@
build: build-arch build-indep
build-arch: build-arch-stamp
build-arch-stamp: configure-stamp
$(MAKE) -C $(CURDIR)/build/kicad
touch $@
build-indep: build-indep-stamp
build-indep-stamp: configure-stamp
$(MAKE) -C $(CURDIR)/build/kicad-doc
$(MAKE) -C $(CURDIR)/build/kicad-library
touch $@
clean: clean-build
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp configure-stamp
# REMOVE AUTOMATICALLY GENERATED FILES
rm -f kicad/pcbnew/dialog_freeroute_exchange_help_html.h \
kicad/eeschema/cmp_library_base.h \
kicad/eeschema/cmp_library_base.cpp
dh_clean
clean-build:
rm -rf $(CURDIR)/build
install: install-indep install-arch
install-indep:
dh_testdir
dh_testroot
dh_clean -k -i
dh_installdirs -i
dh_installdocs
cd $(CURDIR)/build/kicad && cmake -DCOMPONENT=resources -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc/internat && cmake -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-common/usr -P cmake_install.cmake
mkdir -p $(CURDIR)/debian/kicad-common/etc/profile.d
cp $(CURDIR)/debian/kicad-env.sh $(CURDIR)/debian/kicad-common/etc/profile.d
cd $(CURDIR)/build/kicad-library && cmake -DCOMPONENT=resources -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-common/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=file_formats -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-common/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=footprints_doc -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-common/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=doc-de -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-de/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=help-de -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-de/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=doc-en -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-en/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=help-en -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-en/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=doc-es -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-es/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=help-es -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-es/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=doc-fr -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-fr/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=help-fr -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-fr/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=doc-hu -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-hu/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=help-hu -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-hu/usr -P cmake_install.cmake
# cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=doc-it -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-it/usr -P cmake_install.cmake
# cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=help-it -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-it/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=doc-pt -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-pt/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=help-pt -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-pt/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=doc-ru -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-ru/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=help-ru -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-ru/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=doc-zh_CN -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-zh-cn/usr -P cmake_install.cmake
cd $(CURDIR)/build/kicad-doc && cmake -DCOMPONENT=help-zh_CN -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/kicad-doc-zh-cn/usr -P cmake_install.cmake
install-arch:
dh_testdir
dh_testroot
dh_clean -k -s
dh_installdirs -s
dh_installmenu -s
$(MAKE) -C $(CURDIR)/build/kicad preinstall
cd $(CURDIR)/build/kicad && cmake -DCOMPONENT=binary -P cmake_install.cmake
cd $(CURDIR)/build/kicad && cmake -DCOMPONENT=resources -P cmake_install.cmake
# To install python pcbnew.py and _pcbnew.so where put in kicad.install
dh_installdocs
dh_install -s
# Build architecture independant packages.
binary-indep: build-indep install-indep
dh_testdir
dh_testroot
dh_installchangelogs -i
dh_link -i
dh_strip -i
# i don't want the helpfiles to be compressed
dh_compress -i --exclude=kicad/help --exclude=kicad/demos --exclude=.pdf
dh_fixperms -i
dh_makeshlibs -i
dh_installdeb -i
dh_shlibdeps -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture dependant packages.
binary-arch: build-arch install-arch
dh_testdir
dh_testroot
dh_installchangelogs -s kicad/CHANGELOG.txt
dh_installman -s $(CURDIR)/debian/man/*.1
dh_link -s
dh_strip -s
dh_compress -s
dh_fixperms -s
dh_makeshlibs -s
dh_installdeb -s
dh_shlibdeps -s
dh_gencontrol -s
dh_md5sums -s
dh_builddeb -s
binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
|