]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/stage2
GeƤndert:
[ipfire-2.x.git] / lfs / stage2
CommitLineData
cd1a2927
MT
1###############################################################################
2# This file is part of the IPCop Firewall. #
3# #
4# IPCop is free software; you can redistribute it and/or modify #
5# it under the terms of the GNU General Public License as published by #
6# the Free Software Foundation; either version 2 of the License, or #
7# (at your option) any later version. #
8# #
9# IPCop is distributed in the hope that it will be useful, #
10# but WITHOUT ANY WARRANTY; without even the implied warranty of #
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
12# GNU General Public License for more details. #
13# #
14# You should have received a copy of the GNU General Public License #
15# along with IPCop; if not, write to the Free Software #
16# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
17# #
18# Makefiles are based on LFSMake, which is #
19# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
20# #
21# Modifications by: #
22# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
23# - Modified Makefile for IPCop build #
24# #
25# $Id: stage2,v 1.14.2.5 2006/02/08 23:53:37 gespinasse Exp $
26# #
27###############################################################################
28
29###############################################################################
30# Definitions
31###############################################################################
32
33include Config
34
35THISAPP = stage2
36TARGET = $(DIR_INFO)/$(THISAPP)
37
38###############################################################################
39# Top-level Rules
40###############################################################################
41
42install : $(TARGET)
43
44check :
45
46download :
47
48md5 :
49
50###############################################################################
51# Installation Details
52###############################################################################
53
54$(TARGET) :
55 @$(PREBUILD)
56
57 # Create directories
58 -mkdir -p /{bin,boot,dev/{pts,shm,net},etc/opt,home,lib,mnt,proc}
59 -mkdir -p /{root,sbin,tmp,usr/local,var,opt}
60 -for dirname in /usr /usr/local; do \
61 mkdir $$dirname/{bin,etc,include,lib,sbin,share,src}; \
62 ln -sf share/{man,doc,info} $$dirname; \
63 mkdir $$dirname/share/{dict,doc,info,locale,man}; \
64 mkdir $$dirname/share/{nls,misc,terminfo,zoneinfo}; \
65 mkdir $$dirname/share/man/man{1,2,3,4,5,6,7,8}; \
66 done
67 -mkdir -p /var/{lock/subsys,log,mail,run,spool}
68 -mkdir -p /var/{tmp,opt,cache,lib/misc,local,empty}
69 -mkdir /opt/{bin,doc,include,info}
70 -mkdir -p /opt/{lib,man/man{1,2,3,4,5,6,7,8}}
71
72 # Permissions
73 chmod 0750 /root
74 chmod 1777 /tmp /var/tmp
75 chmod 0711 /var/empty
76
77 # Symlinks
78 # for this reason, stage2 rebuild will broke the iso:perl, grubbatch
79 -ln -sf /tools/bin/{bash,cat,pwd,stty} /bin
80 -ln -sf /tools/bin/perl /usr/bin
81 -ln -sf /tools/lib/libgcc_s.so.1 /usr/lib
82 -ln -sf bash /bin/sh
83
84 # Config files
85 for i in $(DIR_SRC)/config/etc/*; do \
86 [ -f $$i ] && cp $$i /etc; \
87 done
88 ln -sf /proc/mounts /etc/mtab
89 echo "$(NAME) v$(VERSION) - $(SLOGAN)" > /etc/issue
90
91 # Scripts
92 for i in `find $(DIR_SRC)/src/scripts -maxdepth 1 -type f`; do \
93 sed "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i > /usr/local/bin/`basename $$i`; \
94 chmod 755 /usr/local/bin/`basename $$i`; \
95 done
96
97 # Nobody user
98 -mkdir -p /home/nobody
99 chown -R nobody:nobody /home/nobody
100
101 # Patches directory
102 -mkdir -m 1775 -p /var/patches
103 chown -R root:nobody /var/patches
104
6d4147d2
MT
105 # Versionsfile
106 echo -n "$(VERSION)" > /etc/ipfire_vers
107
cd1a2927 108 @$(POSTBUILD)