Keep our js libraries for unofficial Debian releases and manage links in doc with Debian tools

This commit is contained in:
Xavier Guimard 2012-03-19 20:53:01 +00:00
parent 8bc790699c
commit b10353596c
3 changed files with 16 additions and 16 deletions

1
debian/lemonldap-ng-doc.dirs vendored Normal file
View File

@ -0,0 +1 @@
/usr/share/doc/lemonldap-ng/examples

3
debian/lemonldap-ng-doc.links vendored Normal file
View File

@ -0,0 +1,3 @@
/usr/share/doc/liblemonldap-ng-handler-perl/examples /usr/share/doc/lemonldap-ng/examples/handler
/usr/share/doc/liblemonldap-ng-portal-perl/examples /usr/share/doc/lemonldap-ng/examples/portal
/usr/share/doc/liblemonldap-ng-manager-perl/examples /usr/share/doc/lemonldap-ng/examples/manager

28
debian/rules vendored
View File

@ -77,14 +77,16 @@ install: build
APACHEGROUP=www-data \
DOCDIR=/usr/share/doc/lemonldap-ng-doc
# FOR OFFICIAL RELEASES
# ---------------------
# Since Lenny, jquery.js is provided by libjs-jquery
find $(CURDIR)/debian/tmp -type f -regex '.*/jquery-[0-9].*\.js' -delete
find $(CURDIR)/debian/tmp -type f -name jquery.js -delete
rm -f $(CURDIR)/debian/tmp$(LMSHAREDIR)/*-skins/*/jquery.js
#find $(CURDIR)/debian/tmp -type f -regex '.*/jquery-[0-9].*\.js' -delete
#find $(CURDIR)/debian/tmp -type f -name jquery.js -delete
#rm -f $(CURDIR)/debian/tmp$(LMSHAREDIR)/*-skins/*/jquery.js
# Now, jquery.cookie.js is provided by libjs-jquery-cookie
find $(CURDIR)/debian/tmp -type f -name jquery.cookie.js -delete
rm -f $(CURDIR)/debian/tmp$(LMSHAREDIR)/*-skins/*/jquery.cookie.js
#find $(CURDIR)/debian/tmp -type f -name jquery.cookie.js -delete
#rm -f $(CURDIR)/debian/tmp$(LMSHAREDIR)/*-skins/*/jquery.cookie.js
# TODO: uncomment this when Debian jquery-ui version will be upgraded to 1.8.6
#find $(CURDIR)/debian/tmp -type f -regex '.*/jquery-ui-[0-9].*\.js' -delete
@ -92,13 +94,12 @@ install: build
#rm -f $(CURDIR)/debian/tmp$(LMSHAREDIR)/*-skins/*/jquery-ui.js
# TODO: restore this in Perl (with final \ )
# s#src=(["'"'"']).*?jquery-ui(-\d[\.\w\-]*?)?.js#src=$$1/javascript/jquery-ui/jquery-ui.min.js#i;'
perl -i -pe 's#src=(["'"'"']).*?jquery(-\d[\.\w\-]*?)?.js#src=$$1/javascript/jquery/jquery.min.js#i; \
s#src=(["'"'"']).*?jquery\.cookie\.js#src=$$1/javascript/jquery-cookie/jquery.cookie.min.js#i;' \
$$(find $(CURDIR)/debian/tmp/examples/manager/ -name *.pl -type f) \
$$(find $(CURDIR)/debian/tmp$(LMSHAREDIR)/manager-skins/*/ \
$(CURDIR)/debian/tmp$(LMSHAREDIR)/portal-skins/*/ -type f -name *.tpl)
#perl -i -pe 's#src=(["'"'"']).*?jquery(-\d[\.\w\-]*?)?.js#src=$$1/javascript/jquery/jquery.min.js#i; \
# s#src=(["'"'"']).*?jquery\.cookie\.js#src=$$1/javascript/jquery-cookie/jquery.cookie.min.js#i;' \
# $$(find $(CURDIR)/debian/tmp/examples/manager/ -name *.pl -type f) \
# $$(find $(CURDIR)/debian/tmp$(LMSHAREDIR)/manager-skins/*/ \
# $(CURDIR)/debian/tmp$(LMSHAREDIR)/portal-skins/*/ -type f -name *.tpl)
# TODO: uncomment this for official releases
#test -n "$$LOCALBUILD" || ./scripts/minifierjs $$(find debian/tmp/ -name '*.js')
#test -n "$$LOCALBUILD" || ./scripts/minifiercss $$(find debian/tmp/ -name '*.css')
@ -115,11 +116,6 @@ binary-indep: build install
dh_installdocs
dh_installexamples
dh_install
mkdir -p debian/lemonldap-ng/usr/share/doc/lemonldap-ng/examples && \
cd debian/lemonldap-ng/usr/share/doc/lemonldap-ng/examples && \
ln -s ../../liblemonldap-ng-handler-perl/examples handler && \
ln -s ../../liblemonldap-ng-manager-perl/examples manager && \
ln -s ../../liblemonldap-ng-portal-perl/examples portal
chmod +x debian/liblemonldap-ng-portal-perl$(LMSHAREDIR)/bin/purgeCentralCache
chmod +x debian/liblemonldap-ng-handler-perl$(LMSHAREDIR)/bin/purgeLocalCache
# dh_installmenu