2 SCM=$(shell if test -d .svn; then echo svn; elif test -d .git; then echo git; fi)
3 DATE=$(shell date +%Y%m%d%H%M)
7 SVNVER=_SVN$(shell LANG=C svnversion .)
12 datadir=$(prefix)/share
14 pkglibdir=$(libdir)/$(BUILD)
16 man1dir=$(mandir)/man1
24 $(DESTDIR)$(pkglibdir)/configs \
25 $(DESTDIR)$(pkglibdir)/Build \
62 $(DESTDIR)$(pkglibdir)
63 install -m644 Build/*.pm $(DESTDIR)$(pkglibdir)/Build
64 install -m644 qemu-reg $(DESTDIR)$(pkglibdir)
65 install -m644 *.pm baselibs_global*.conf lxc.conf $(DESTDIR)$(pkglibdir)
66 install -m644 configs/* $(DESTDIR)$(pkglibdir)/configs
67 install -m644 build.1 $(DESTDIR)$(man1dir)
68 ln -sf $(pkglibdir)/build $(DESTDIR)$(bindir)/build
69 ln -sf $(pkglibdir)/vc $(DESTDIR)$(bindir)/buildvc
70 ln -sf $(pkglibdir)/unrpm $(DESTDIR)$(bindir)/unrpm
72 # Allow initvm to be packaged seperately from the rest of build. This
73 # is useful because it is distributed as a static binary package (e.g.
74 # build-initvm-static) whereas the build scripts package is noarch.
77 $(CC) -o $@ -static $(CFLAGS) initvm.c
83 initvm-install: initvm
84 install -m755 -d $(DESTDIR)$(pkglibdir)
85 install -m755 initvm $(DESTDIR)$(pkglibdir)/initvm
90 rm -rf $(BUILD)-$(VERSION)$(SVNVER)
91 svn export . $(BUILD)-$(VERSION)$(SVNVER)
92 tar --force-local -cjf $(BUILD)-$(VERSION)$(SVNVER).tar.bz2 $(BUILD)-$(VERSION)$(SVNVER)
93 rm -rf $(BUILD)-$(VERSION)$(SVNVER)
96 git archive --prefix=$(BUILD)-$(VERSION)_git$(DATE)/ HEAD| bzip2 > $(BUILD)-$(VERSION)_git$(DATE).tar.bz2