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)
6 INITVM_ARCH=$(shell bash -c '. common_functions ; build_host_arch; echo $$BUILD_INITVM_ARCH')
9 SVNVER=_SVN$(shell LANG=C svnversion .)
14 datadir=$(prefix)/share
16 pkglibdir=$(libdir)/$(BUILD)
18 man1dir=$(mandir)/man1
26 $(DESTDIR)$(pkglibdir)/configs \
27 $(DESTDIR)$(pkglibdir)/Build \
28 $(DESTDIR)$(pkglibdir)/emulator \
65 telnet_login_wrapper \
66 $(DESTDIR)$(pkglibdir)
67 install -m755 emulator/emulator.sh $(DESTDIR)$(pkglibdir)/emulator/
68 install -m644 Build/*.pm $(DESTDIR)$(pkglibdir)/Build
69 install -m644 qemu-reg $(DESTDIR)$(pkglibdir)
70 install -m644 build-vm build-vm-* $(DESTDIR)$(pkglibdir)
71 install -m644 build-recipe build-recipe-* $(DESTDIR)$(pkglibdir)
72 install -m644 build-pkg build-pkg-* $(DESTDIR)$(pkglibdir)
73 install -m644 *.pm baselibs_global*.conf lxc.conf $(DESTDIR)$(pkglibdir)
74 install -m644 configs/* $(DESTDIR)$(pkglibdir)/configs
75 install -m644 build.1 $(DESTDIR)$(man1dir)
76 install -m644 vc.1 $(DESTDIR)$(man1dir)
77 install -m644 unrpm.1 $(DESTDIR)$(man1dir)
78 ln -sf $(pkglibdir)/build $(DESTDIR)$(bindir)/build
79 ln -sf $(pkglibdir)/vc $(DESTDIR)$(bindir)/buildvc
80 ln -sf $(pkglibdir)/unrpm $(DESTDIR)$(bindir)/unrpm
82 # Allow initvm to be packaged seperately from the rest of build. This
83 # is useful because it is distributed as a static binary package (e.g.
84 # build-initvm-static) whereas the build scripts package is noarch.
87 $(CC) -o $@.$(INITVM_ARCH) -static $(CFLAGS) initvm.c
93 initvm-install: initvm
94 install -m755 -d $(DESTDIR)$(pkglibdir)
95 install -m755 initvm.$(INITVM_ARCH) $(DESTDIR)$(pkglibdir)/initvm.$(INITVM_ARCH)
100 rm -rf $(BUILD)-$(VERSION)$(SVNVER)
101 svn export . $(BUILD)-$(VERSION)$(SVNVER)
102 tar --force-local -cjf $(BUILD)-$(VERSION)$(SVNVER).tar.bz2 $(BUILD)-$(VERSION)$(SVNVER)
103 rm -rf $(BUILD)-$(VERSION)$(SVNVER)
106 git archive --prefix=$(BUILD)-$(VERSION)_git$(DATE)/ HEAD| bzip2 > $(BUILD)-$(VERSION)_git$(DATE).tar.bz2