/[baselayout]/trunk/Makefile
Gentoo

Contents of /trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3112 - (hide annotations) (download)
Sun Mar 23 01:16:58 2008 UTC (6 years, 5 months ago) by vapier
File size: 2093 byte(s)
cleanup dist targets
1 uberlord 2547 # baselayout Makefile
2 vapier 3112 # Copyright 2006-2008 Gentoo Foundation
3 uberlord 2547 # Distributed under the terms of the GNU General Public License v2
4     #
5     # We've moved the installation logic from Gentoo ebuild into a generic
6     # Makefile so that the ebuild is much smaller and more simple.
7     # It also has the added bonus of being easier to install on systems
8     # without an ebuild style package manager.
9    
10 vapier 3110 SUBDIRS = etc share
11 uberlord 2547
12     NAME = baselayout
13 vapier 3110 VERSION = 2.0.0
14 uberlord 2547
15     PKG = $(NAME)-$(VERSION)
16    
17     ifeq ($(OS),)
18     OS=$(shell uname -s)
19     ifneq ($(OS),Linux)
20     OS=BSD
21     endif
22     endif
23    
24 vapier 3112 KEEP_DIRS = /boot /home /mnt /root /proc \
25 uberlord 2547 /usr/local/bin /usr/local/sbin /usr/local/share/doc /usr/local/share/man \
26 vapier 3112 /var/lock /var/run /var/empty
27 uberlord 2547
28     ifeq ($(OS),Linux)
29     KEEP_DIRS += /dev /sys
30     endif
31    
32     TOPDIR = .
33     include $(TOPDIR)/default.mk
34    
35     install::
36     # These dirs may not exist from prior versions
37     for x in $(BASE_DIRS) ; do \
38     $(INSTALL_DIR) $(DESTDIR)$$x || exit $$? ; \
39     touch $(DESTDIR)$$x/.keep || exit $$? ; \
40     done
41    
42     layout:
43     # Create base filesytem layout
44     for x in $(KEEP_DIRS) ; do \
45     $(INSTALL_DIR) $(DESTDIR)$$x || exit $$? ; \
46     touch $(DESTDIR)$$x/.keep || exit $$? ; \
47     done
48     # Special dirs
49     install -m 0700 -d $(DESTDIR)/root || exit $$?
50     touch $(DESTDIR)/root/.keep || exit $$?
51     install -m 1777 -d $(DESTDIR)/var/tmp || exit $$?
52     touch $(DESTDIR)/var/tmp/.keep || exit $$?
53     install -m 1777 -d $(DESTDIR)/tmp || exit $$?
54     touch $(DESTDIR)/tmp/.keep || exit $$?
55     # FHS compatibility symlinks stuff
56     ln -snf /var/tmp $(DESTDIR)/usr/tmp || exit $$?
57     ln -snf share/man $(DESTDIR)/usr/local/man || exit $$?
58    
59 vapier 2601 diststatus:
60 uberlord 2547 if test -d .svn ; then \
61     svnfiles=`svn status 2>&1 | egrep -v '^(U|P)'` ; \
62     if test "x$$svnfiles" != "x" ; then \
63     echo "Refusing to package tarball until svn is in sync:" ; \
64     echo "$$svnfiles" ; \
65     echo "make distforce to force packaging" ; \
66     exit 1 ; \
67     fi \
68     fi
69    
70     distforce:
71 vapier 2600 rm -rf /tmp/$(PKG)
72 vapier 3112 svn export -q . /tmp/$(PKG)
73     tar jcf /tmp/$(PKG).tar.bz2 -C /tmp $(PKG)
74 vapier 2601 rm -rf /tmp/$(PKG)
75 uberlord 2602 ls -l /tmp/$(PKG).tar.bz2
76 vapier 2601
77 vapier 3112 dist: diststatus distforce
78 uberlord 2547
79 vapier 3112 .PHONY: layout dist distforce diststatus
80 uberlord 2547
81     # vim: set ts=4 :

  ViewVC Help
Powered by ViewVC 1.1.20