]>
Commit | Line | Data |
---|---|---|
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 | # # | |
cd1a2927 MT |
21 | ############################################################################### |
22 | ||
23 | ############################################################################### | |
24 | # Definitions | |
25 | ############################################################################### | |
26 | ||
27 | include Config | |
28 | ||
15679d9f MT |
29 | VER = ipfire |
30 | ||
cd1a2927 MT |
31 | THISAPP = stage2 |
32 | TARGET = $(DIR_INFO)/$(THISAPP) | |
33 | ||
34 | ############################################################################### | |
35 | # Top-level Rules | |
36 | ############################################################################### | |
37 | ||
38 | install : $(TARGET) | |
39 | ||
40 | check : | |
41 | ||
42 | download : | |
43 | ||
44 | md5 : | |
45 | ||
46 | ############################################################################### | |
47 | # Installation Details | |
48 | ############################################################################### | |
49 | ||
50 | $(TARGET) : | |
51 | @$(PREBUILD) | |
52 | ||
53 | # Create directories | |
54 | -mkdir -p /{bin,boot,dev/{pts,shm,net},etc/opt,home,lib,mnt,proc} | |
55 | -mkdir -p /{root,sbin,tmp,usr/local,var,opt} | |
56 | -for dirname in /usr /usr/local; do \ | |
57 | mkdir $$dirname/{bin,etc,include,lib,sbin,share,src}; \ | |
58 | ln -sf share/{man,doc,info} $$dirname; \ | |
59 | mkdir $$dirname/share/{dict,doc,info,locale,man}; \ | |
60 | mkdir $$dirname/share/{nls,misc,terminfo,zoneinfo}; \ | |
61 | mkdir $$dirname/share/man/man{1,2,3,4,5,6,7,8}; \ | |
62 | done | |
63 | -mkdir -p /var/{lock/subsys,log,mail,run,spool} | |
64 | -mkdir -p /var/{tmp,opt,cache,lib/misc,local,empty} | |
65 | -mkdir /opt/{bin,doc,include,info} | |
66 | -mkdir -p /opt/{lib,man/man{1,2,3,4,5,6,7,8}} | |
67 | ||
68 | # Permissions | |
69 | chmod 0750 /root | |
70 | chmod 1777 /tmp /var/tmp | |
71 | chmod 0711 /var/empty | |
72 | ||
73 | # Symlinks | |
74 | # for this reason, stage2 rebuild will broke the iso:perl, grubbatch | |
75 | -ln -sf /tools/bin/{bash,cat,pwd,stty} /bin | |
76 | -ln -sf /tools/bin/perl /usr/bin | |
77 | -ln -sf /tools/lib/libgcc_s.so.1 /usr/lib | |
78 | -ln -sf bash /bin/sh | |
79 | ||
80 | # Config files | |
81 | for i in $(DIR_SRC)/config/etc/*; do \ | |
82 | [ -f $$i ] && cp $$i /etc; \ | |
83 | done | |
84 | ln -sf /proc/mounts /etc/mtab | |
85 | echo "$(NAME) v$(VERSION) - $(SLOGAN)" > /etc/issue | |
86 | ||
87 | # Scripts | |
88 | for i in `find $(DIR_SRC)/src/scripts -maxdepth 1 -type f`; do \ | |
89 | sed "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i > /usr/local/bin/`basename $$i`; \ | |
90 | chmod 755 /usr/local/bin/`basename $$i`; \ | |
91 | done | |
92 | ||
93 | # Nobody user | |
94 | -mkdir -p /home/nobody | |
95 | chown -R nobody:nobody /home/nobody | |
96 | ||
97 | # Patches directory | |
98 | -mkdir -m 1775 -p /var/patches | |
99 | chown -R root:nobody /var/patches | |
100 | ||
6d4147d2 MT |
101 | # Versionsfile |
102 | echo -n "$(VERSION)" > /etc/ipfire_vers | |
103 | ||
cd1a2927 | 104 | @$(POSTBUILD) |