usr bin make -f export PERL_MM_USE_DEFAULT GUIDEDIR CURDIR Users_Guide

 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
#!/usr/bin/make -f
export PERL_MM_USE_DEFAULT=1
GUIDEDIR=$(CURDIR)/Users_Guide
DOCDIR=$(CURDIR)/debian/publican/usr/share/doc/publican
GUIDE_CFG=$(CURDIR)/Users_Guide/publican.cfg
%:
dh $@
override_dh_auto_build:
# Save original publican.cfg
if ! [ -f $(GUIDE_CFG).orig ]; then cp $(GUIDE_CFG) $(GUIDE_CFG).orig; fi
dh_auto_build
cd $(GUIDEDIR) && \
perl -I $(CURDIR)/blib/lib $(CURDIR)/blib/script/publican build \
--formats=html-desktop --publish --langs=all \
--common_config="$(CURDIR)/blib/datadir" \
--common_content="$(CURDIR)/blib/datadir/Common_Content"
override_dh_auto_install:
dh_auto_install
mkdir -p $(DOCDIR)
mv $(GUIDEDIR)/publish $(DOCDIR)/Users_Guide
override_dh_auto_clean:
dh_auto_clean
# Restore original publican.cfg
if [ -f $(GUIDE_CFG).orig ]; then mv -f $(GUIDE_CFG).orig $(GUIDE_CFG); fi