53 lines
1.6 KiB
Makefile
53 lines
1.6 KiB
Makefile
# openmamba-website Makefile for installation and packaging
|
|
# Copyright (c) 2003-2011 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
# PARTICULAR PURPOSE.
|
|
|
|
include VERSION
|
|
|
|
package = openmamba-website
|
|
distdir = $(package)-$(version)
|
|
dist_archive = $(package)-$(version).tar.bz2
|
|
|
|
prefix := /usr
|
|
localstatedir := /var
|
|
datadir := $(prefix)/share
|
|
wwwdir := $(localstatedir)/www
|
|
sysconfdir := /etc
|
|
ftproot := $(localstatedir)/ftp/pub/
|
|
|
|
wwwfiles: clean
|
|
@touch wwwroot/captcha/index.html wwwroot/cgi-bin/index.html \
|
|
wwwroot/images/index.html;\
|
|
ln -sf $(ftproot) wwwroot/pub
|
|
|
|
dist: clean wwwfiles
|
|
@git clean -f
|
|
@git log > NEWS
|
|
@mkdir /tmp/$(distdir)
|
|
@cp -a * /tmp/$(distdir)/
|
|
@rm -f $(dist_archive);\
|
|
tar cf - -C /tmp $(distdir) | bzip2 -9 -c > $(dist_archive)
|
|
@rm -rf /tmp/$(distdir)
|
|
@echo "file \`$(dist_archive)' created"
|
|
|
|
dist-rpm: dist
|
|
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\
|
|
mv -f $(package)-$(version).tar.bz2 $$rpm_sourcedir;\
|
|
echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'"
|
|
|
|
clean:
|
|
@rm -fr $(dist_archive) wwwroot/backup-old wwwroot/google*.html;\
|
|
rm -fr wwwroot/captcha/* \
|
|
wwwroot/pub wwwroot/cgi-bin/regdb wwwroot/cgi-bin/config.rpmsave \
|
|
wwwroot/old
|
|
|
|
install:
|
|
@install -d $(DESTDIR)$(wwwdir)/www.openmamba.org;\
|
|
cp -a wwwroot/* $(DESTDIR)$(wwwdir)/www.openmamba.org;\
|
|
install -d $(DESTDIR)$(sysconfdir)/httpd/httpd.d;\
|
|
cp -a config/www.openmamba.org.conf $(DESTDIR)$(sysconfdir)/httpd/httpd.d
|