aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 572234e5d06082022ade7398fa04add13b3e7193 (plain)
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
VERSION=0.28

PROJECTNAME=mga-advisories
TARNAME=mgaadvisories
BINFILES=mgaadv
CFGFILES=mga-advisories.conf
TMPLFILES=tmpl/*.html tmpl/*.txt tmpl/*.adv tmpl/*.rss tmpl/*.json
STATICFILES=static/*

sysconfdir=/etc
bindir=/usr/bin
sharedir=/usr/share
projectdir=$(sharedir)/$(PROJECTNAME)
tmpldir=$(projectdir)/tmpl
staticdir=$(projectdir)/static
perldir=/usr/lib/perl5/site_perl

all:

install:
	install -d $(DESTDIR)$(projectdir) $(DESTDIR)$(tmpldir) \
	    $(DESTDIR)$(bindir) $(DESTDIR)$(sysconfdir) \
	    $(DESTDIR)$(staticdir)
	install -m 755 $(BINFILES) $(DESTDIR)$(bindir)
	install -m 644 $(CFGFILES) $(DESTDIR)$(sysconfdir)
	install -m 644 $(TMPLFILES) $(DESTDIR)$(tmpldir)
	install -m 644 $(STATICFILES) $(DESTDIR)$(staticdir)
	install -m 644 config_default $(DESTDIR)$(projectdir)/config
	install -d $(DESTDIR)$(perldir)/MGA
	install -m 644 lib/MGA/Advisories.pm $(DESTDIR)$(perldir)/MGA

tar:
	git archive HEAD --prefix=$(TARNAME)-$(VERSION)/ | xz > $(TARNAME)-$(VERSION).tar.xz