aboutsummaryrefslogtreecommitdiff
path: root/b9d14f1a411557f9dd7617322e939322dabaefed
diff options
context:
space:
mode:
Diffstat (limited to 'b9d14f1a411557f9dd7617322e939322dabaefed')
0 files changed, 0 insertions, 0 deletions
3464
354779d4
6f9a00b1
0fb7ecdb
4fed8aad
0fb7ecdb

7c26e04d






744d01a9


82cdb468
7c26e04d
8e3a5e78


6f9a00b1
8e3a5e78




3b361f01
8e3a5e78

3b361f01
a3eacc05
8e3a5e78
0fb7ecdb
744d01a9
7c26e04d
a3eacc05
d3dc1dfc
1d695102
0fb7ecdb
f840c17b
a3eacc05
6643c820
4ff9d2aa
41759360
744d01a9

0fb7ecdb


8e3a5e78





e92f3aa1
3324a568
61a8790f



e8326ac3
5adecaef
e185041e

05397773
e185041e

05397773
a49aa1e9


84a57b72


39676701
41759360


0fb7ecdb
7c26e04d
e8326ac3
4ff9d2aa
8d32ffd7
1bf351fb
e13f872d
8d32ffd7
1bf351fb
e13f872d


3b361f01
3f3019d6
ce6f26e0

1f7c7823
59458a3c




d1709e15
10c6004d
d683fb93
10c6004d


b413d8ea
4bd92fbf
cdb12235
59458a3c

94bad6e5
41759360
2625ea19
dbc55c69
fc2941d9
dbc55c69
e625b7a6


41759360
e625b7a6

41759360
e625b7a6

41759360
e625b7a6
b7994bfb
e625b7a6
60832545
e625b7a6

60832545

e625b7a6
60832545

e625b7a6
0de60a45
9f04e7e2






5cd0f4c6


9f04e7e2
c6302a1c
9f04e7e2





7f04cab7
2ec1f2b0

7f04cab7
27f1137a
9f04e7e2



fad05d8c
9f04e7e2

bc934a48
e13f872d
bc934a48
c6302a1c
7c26e04d
1bf351fb


d683fb93


3b361f01
89567f2d


82cdb468






6f9a00b1
4ff9d2aa
89567f2d
3b361f01
2f147072
4d283464
82cdb468
4ff9d2aa
7c26e04d
744d01a9
7c26e04d

744d01a9
7c26e04d

744d01a9
7c26e04d


d683fb93
7c26e04d

d683fb93
7c26e04d

d683fb93
7c26e04d

d683fb93
7c26e04d

d683fb93
7c26e04d
fc2941d9


7c26e04d
d683fb93
6f9a00b1
e212f7ab
82cdb468
e212f7ab
1d695102


6643c820
354779d4


6761e622
82cdb468
6f9a00b1
5c012d8d

5c012d8d
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256

      
                         
                 
 
                         
                         
                           
 
                  
                                 

                






                                  


                              
                              
 


                                    
                          




                                 
                                           

                                           
                                                 
                                         
                          
 
                          
 
                                                                                   
                                  
                                                                                    
 
             
 
                                                                               
 
                                                                                                    

                             


                                       





                                   
                                                                                                              
 



                                                                                 
                    
 

                                                         
 

                                                   
 


                                                           


                                   
                                                                                        


                                                                          
       
                                               
                            
                                                   
 
         
                                              
 
                     


                               
                       
 

                   
 




                                                                                                 
 
               
                                                                                            


                      
                   
 
                                                

                            
              
                                                                                                                                                                     
 
     
                                                                                                                                       
 


                        
                                                              

                      
                                                              

                        
                                                              
 
                              
 
         

                                  

                          
 

                          
 
                                                                                






                                                                                  


                                         
                 
                                                    





                                                         
                                                                       

                                                                  
                     
                                                      



                                                                                  
                                                                       

                                   
 
                          
                            
                           
 


                                                                                      


                                           
                                                      


                                                                                   






                                                                               
                    
                   
                                       
                                                       
                                                   
                                       
                                                 
                                                                    
 
                                   

                         
                                 

                         
                                         


                         
                         

               
                         

                 
                         

             
                         

               
                         
 


                         
               
                         
 
                                                                       
                         
 


                                                                                     
                                                       


                                                                        
 
                                                           
                           

                                                               
                           
# $Id$

SUBDIRS = @RPKID_SUBDIRS@
PYTHON = @PYTHON@

SECRET_KEY = @SECRET_KEY@
DJANGO_DIR = @DJANGO_DIR@
VIRTUAL_ENV = @VIRTUAL_ENV@

CFLAGS	= @CFLAGS@
LDFLAGS = @LDFLAGS@ @POW_LDFLAGS@
LIBS	= @LIBS@

prefix		= @prefix@
exec_prefix	= @exec_prefix@
datarootdir	= @datarootdir@
datadir		= @datadir@
localstatedir	= @localstatedir@
sharedstatedir	= @sharedstatedir@
sysconfdir	= @sysconfdir@
bindir		= @bindir@
sbindir		= @sbindir@
libexecdir	= @libexecdir@
sysconfdir	= @sysconfdir@

abs_builddir	= @abs_builddir@
abs_top_srcdir	= @abs_top_srcdir@
abs_top_builddir= @abs_top_builddir@
srcdir          = @srcdir@

SETUP_PY = \
	AC_CFLAGS='${CFLAGS}' \
	AC_LDFLAGS='${LDFLAGS}' \
	AC_LIBS='${LIBS}' \
	AC_SBINDIR='${DESTDIR}${sbindir}' \
	AC_SCRIPTS='${SCRIPTS}' \
	AC_ABS_BUILDDIR='${abs_builddir}' \
	AC_LIBEXECDIR='${DESTDIR}${libexecdir}' \
	AC_AUX_SCRIPTS='${AUX_SCRIPTS}' \
	${PYTHON} setup.py

POW_SO	= rpki/POW/_POW.so

SCRIPTS = rpki-sql-backup rpki-sql-setup rpki-start-servers irbe_cli irdbd myrpki \
	  pubd rootd rpkic rpkid \
	  portal-gui/scripts/rpkigui-rcynic portal-gui/scripts/rpkigui-import-routes

AUX_SCRIPTS =

SETTINGS = portal-gui/settings.py rpki/gui/app/settings.py portal-gui/rpki.wsgi

all:: ${POW_SO} rpki/relaxng.py myrpki.rng rpki/sql_schemas.py ${SCRIPTS} ${AUX_SCRIPTS} ${SETTINGS}

${POW_SO}: ext/POW.c setup.py
	${SETUP_PY} build_ext --inplace

clean::
	rm -rf ${POW_SO} build dist

rpm deb:: all
	${SETUP_PY} bdist_rpm

deb::
	cd dist; for i in *.rpm; do case $$i in *.src.rpm) :;; *) (set -x; fakeroot alien -v $$i);; esac; done

RNGS = left-right-schema.rng up-down-schema.rng publication-schema.rng myrpki.rng

rpki/relaxng.py: ${abs_top_srcdir}/buildtools/make-relaxng.py ${RNGS}
	${PYTHON} ${abs_top_srcdir}/buildtools/make-relaxng.py ${RNGS} >$@.tmp
	mv $@.tmp $@

left-right-schema.rng: left-right-schema.rnc
	trang left-right-schema.rnc left-right-schema.rng

up-down-schema.rng: up-down-schema.rnc
	trang up-down-schema.rnc up-down-schema.rng

publication-schema.rng: publication-schema.rnc
	trang publication-schema.rnc publication-schema.rng

myrpki.rng: myrpki.rnc
	trang myrpki.rnc myrpki.rng

rpki/sql_schemas.py: ${abs_top_srcdir}/buildtools/make-sql-schemas.py rpkid.sql pubd.sql
	${PYTHON} ${abs_top_srcdir}/buildtools/make-sql-schemas.py >$@.tmp
	mv $@.tmp $@

clean::
	find . -type f -name '*.py[co]' -delete
	cd tests; $(MAKE) $@
	rm -f ${SCRIPTS} ${AUX_SCRIPTS} ${SETTINGS}

install::
	${SETUP_PY} install --record installed

uninstall deinstall::
	xargs rm -fv <installed

distclean::
	rm -f installed

dont-run-trang:
	touch *.rng

relaxng: left-right-schema.rng up-down-schema.rng publication-schema.rng
	cd tests; $(MAKE) protocol-samples
	xmllint --noout --relaxng  left-right-schema.rng  tests/left-right-protocol-samples/*.xml
	xmllint --noout --relaxng     up-down-schema.rng     tests/up-down-protocol-samples/*.xml
	xmllint --noout --relaxng publication-schema.rng tests/publication-protocol-samples/*.xml

unit-tests: all
	PWD=`pwd`; for i in rpki/*.py; do echo "[$$i]"; PYTHONPATH=$$PWD ${PYTHON} $$i; done

all-tests:: unit-tests

all-tests:: relaxng

test all-tests parse-test profile yamltest:: all
	cd tests; $(MAKE) $@

tags: Makefile
	find . -type f \( -name '*.py' -o -name '*.sql' -o -name '*.rnc' -o -name '*.py.in' \) ! -name relaxng.py ! -name sql_schemas.py ! -name __doc__.py | etags -

lint:
	pylint --rcfile ${abs_top_srcdir}/buildtools/pylint.rc rpki/[a-z]*.py *d.py rpki-*.py myrpki.py rpkic.py irbe_cli.py tests/*.py

# Documentation

doc/irdbd.dot: irdbd.sql
	sh ${abs_top_srcdir}/buildtools/graphviz-sql.sh $? >$@

doc/pubd.dot: pubd.sql
	sh ${abs_top_srcdir}/buildtools/graphviz-sql.sh $? >$@

doc/rpkid.dot: rpkid.sql
	sh ${abs_top_srcdir}/buildtools/graphviz-sql.sh $? >$@

.SUFFIXES: .dot .png .pdf .eps

.dot.pdf:
	dot -Tps2 $? | ps2pdf - $@

.dot.eps:
	dot -o $@ -Teps $?

.dot.png:
	dot -o $@ -Tpng $?

TEXT_DOCS = Installation Configuration Left-Right Publication MySQL-Setup MyRPKI

dot: doc/irdbd.dot doc/pubd.dot doc/rpkid.dot

eps: doc/irdbd.eps doc/pubd.eps doc/rpkid.eps doc/rpkid-bpki.eps doc/pubd-bpki.eps

png: doc/irdbd.png doc/pubd.png doc/rpkid.png doc/rpkid-bpki.png doc/pubd-bpki.png

docclean:
	rm -rf doc/html doc/latex doc/xml

html: dot eps png
	TZ='' IMAGE_PATH=${abs_builddir}/doc doxygen

tgz: html
	cd doc && tar -cf - html | gzip -9 >manual.tar.gz

text: html
	for i in ${TEXT_DOCS}; do \
		xsltproc --html doc/tweak-doc.xsl doc/html/$$i.html | \
		html2text -rcfile doc/html2textrc -nobs -ascii | \
		awk -f doc/tweak-doc.awk >doc/$$i; \
	done 2>&1 | \
	awk -f doc/suppress-html-parse-errors.awk 1>&2

pdf: doc/irdbd.pdf doc/pubd.pdf doc/rpkid.pdf doc/rpkid-bpki.pdf doc/pubd-bpki.pdf

pdf: html
	cd doc/latex && TZ='' ${MAKE} && ln -f refman.pdf ../manual.pdf

docs: dot eps png html text tgz pdf

distclean:: clean docclean
	cd tests; ${MAKE} $@
	rm -f TAGS Makefile

all install clean test distclean deinstall uninstall::
	@for i in ${SUBDIRS}; do echo "Making $@ in $$i"; (cd $$i && ${MAKE} $@); done

COMPILE_PYTHON = \
	rm -f $@; \
	AC_PYTHON_INTERPRETER='${PYTHON}' \
	AC_RPKI_CONFIG_DIR='${DESTDIR}${sysconfdir}' \
	${PYTHON} ${abs_top_srcdir}/buildtools/make-python-executable.py <$? >$@; \
	chmod 555 $@

COMPILE_DJANGO = \
	rm -f $@; \
	AC_PYTHON_INTERPRETER='${PYTHON}' \
	AC_PYTHONPATH='${DESTDIR}${sysconfdir}/rpki' \
	${PYTHON} ${abs_top_srcdir}/buildtools/make-django-script.py <$? >$@; \
	chmod 555 $@

COMPILE_SETTINGS = \
	rm -f $@; \
	AC_SECRET_KEY='${SECRET_KEY}' \
	AC_LOCALSTATEDIR='${DESTDIR}${localstatedir}' \
	AC_DATAROOTDIR='${DESTDIR}${datarootdir}' \
	AC_DJANGO_DIR='${DJANGO_DIR}' \
	AC_SYSCONFDIR='${DESTDIR}${sysconfdir}' \
	${PYTHON} ${abs_top_srcdir}/buildtools/subst-vars.py <$? >$@

rpki-sql-backup: rpki-sql-backup.py
	${COMPILE_PYTHON}

rpki-sql-setup: rpki-sql-setup.py
	${COMPILE_PYTHON}

rpki-start-servers: rpki-start-servers.py
	${COMPILE_PYTHON}

irbe_cli: irbe_cli.py
	${COMPILE_PYTHON}

irdbd: irdbd.py
	${COMPILE_PYTHON}

myrpki: myrpki.py
	${COMPILE_PYTHON}

pubd: pubd.py
	${COMPILE_PYTHON}

rootd: rootd.py
	${COMPILE_PYTHON}

rpkic: rpkic.py
	${COMPILE_PYTHON}

rpkid: rpkid.py
	${COMPILE_PYTHON}

portal-gui/scripts/rpkigui-rcynic: portal-gui/scripts/rpkigui-rcynic.py
	${COMPILE_DJANGO}

portal-gui/scripts/rpkigui-import-routes: portal-gui/scripts/rpkigui-import-routes.py
	${COMPILE_DJANGO}

portal-gui/rpki.wsgi: ${srcdir}/portal-gui/rpki.wsgi.in
	sed -e "s|@VIRTUAL"_"ENV@|${VIRTUAL_ENV}|" \
		-e "s|@PYTHON""PATH@|${sysconfdir}/rpki|" \
		${srcdir}/portal-gui/rpki.wsgi.in > portal-gui/rpki.wsgi

portal-gui/settings.py: ${srcdir}/portal-gui/settings.py.in
	${COMPILE_SETTINGS}

rpki/gui/app/settings.py: ${srcdir}/rpki/gui/app/settings.py.in
	${COMPILE_SETTINGS}