1 include ..
/..
/Makefile.omd
5 DIR
= $(NAME
)-$(VERSION
)
6 PYTHON
= LD_LIBRARY_PATH
=$(shell pwd
)/..
/python
/tmp.python27
/lib \
7 $(shell pwd
)/..
/python
/tmp.python27
/bin
/python
10 --prefix=$(OMD_ROOT
) \
13 --enable-perl-site-install \
17 --with-perl-options
="LIB=$(DESTDIR)$(OMD_ROOT)/lib/perl5/lib/perl5"
20 if
[ -d
$(DIR
) ]; then
rm -rf
$(DIR
); fi
22 for p in patches
/*.diff
; do \
23 echo
"applying $$p..." ; \
24 ( cd
$(DIR
) ; patch
-p1
-b
) < $$p ; \
27 # set perl environment to match the other perl modules
28 echo
"install --install_base $(DESTDIR)$(OMD_ROOT)/lib/perl5" > .modulebuildrc
29 export PERL5LIB
=$(P5TMPDIST
)/dest
/lib
/perl5
; \
30 export PERL_MM_OPT
=INSTALL_BASE
=$(DESTDIR
)$(OMD_ROOT
)/lib
/perl5
; \
31 export MODULEBUILDRC
=$$(pwd
)/.modulebuildrc
; \
32 export LDFLAGS
="-lglib-2.0"; \
34 .
/configure
$(CONFIGUREOPTS
) && \
38 export LDFLAGS
="-L$(shell pwd)/../python/tmp.python27/lib -L$(shell pwd)/../python/tmp.python27/lib/python2.7/config" ; \
39 cd
$(DIR
)/bindings
/python
&& $(PYTHON
) setup.py build
42 @if
[ ! -d ..
/python
/tmp.python27
]; then \
43 echo
"ERROR: You need to build the \"python\" package first" ; \
48 export PERL5LIB
=$(P5TMPDIST
)/dest
/lib
/perl5
; \
49 $(MAKE
) DESTDIR
=$(DESTDIR
) -C
$(DIR
) install
51 # clean up perl man pages which end up in wrong location
52 # clean up systemd init files
53 if
[ -n
"$(DESTDIR)" ]; then \
54 rm -fr
$(DESTDIR
)/usr
/local
; \
55 rm -fr
$(DESTDIR
)/lib
; \
58 mkdir
$(DESTDIR
)$(OMD_ROOT
)/share
/doc
/rrdtool || true
59 install -m
644 $(DIR
)/COPYRIGHT
$(DESTDIR
)$(OMD_ROOT
)/share
/doc
/rrdtool
60 install -m
644 $(DIR
)/CONTRIBUTORS
$(DESTDIR
)$(OMD_ROOT
)/share
/doc
/rrdtool
63 export PYTHONPATH
=$$PYTHONPATH:$(DESTDIR
)$(OMD_ROOT
)/lib
/python
&& \
64 cd
$(DIR
)/bindings
/python
&& \
65 $(PYTHON
) setup.py
install --home
=$(DESTDIR
)/$(OMD_ROOT
) --prefix "" \
66 --install-platlib
=$(DESTDIR
)$(OMD_ROOT
)/lib
/python \
67 --install-purelib
=$(DESTDIR
)$(OMD_ROOT
)/lib
/python \
69 if
[ -n
"$(DESTDIR)$(OMD_ROOT)" -a
-d
"$(DESTDIR)$(OMD_ROOT)/lib64" ] ; then \
70 rsync
-avh
$(DESTDIR
)$(OMD_ROOT
)/lib64
/* $(DESTDIR
)$(OMD_ROOT
)/lib
/ ; \
71 rm -rf
$(DESTDIR
)$(OMD_ROOT
)/lib64
; \