bad8d0468d6fdaa447bb37f9ba0b8f4ba4255791
[invirt/packages/invirt-web.git] / debian / rules
1 #!/usr/bin/make -f
2
3 DEB_DIVERT_EXTENSION = .invirt
4 DEB_DIVERT_FILES_invirt-web += \
5     /etc/apache2/conf.d/gitweb \
6     /etc/init.d/apache2 \
7     /etc/gitweb.conf \
8
9 include /usr/share/cdbs/1/rules/debhelper.mk
10 include /usr/share/cdbs/1/rules/config-package.mk
11
12 DEB_UPDATE_RCD_PARAMS_invirt-web += defaults 91 9
13
14 GIT_HEAD=$(shell git rev-parse HEAD)
15
16 binary-fixup/invirt-web::
17         git clone $$(invirt-getconf git.uri)/invirt/packages/invirt-web $(DEB_DESTDIR)/usr/share/invirt-web/package
18         cd $(DEB_DESTDIR)/usr/share/invirt-web/package && git checkout $(GIT_HEAD)
19         mkdir -p $(DEB_DESTDIR)/var/www/
20         ln -s /usr/share/invirt-web/package/code $(DEB_DESTDIR)/var/www/invirt-web
21         rm -rf $(DEB_DESTDIR)/var/www/invirt-web-repo