]> git.ipfire.org Git - ipfire-3.x.git/blame - filesystem/filesystem.nm
git: Update to 2.23.0
[ipfire-3.x.git] / filesystem / filesystem.nm
CommitLineData
803dc34f 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
803dc34f
MT
4###############################################################################
5
802ea3af 6name = filesystem
f43b253b 7version = 002
4cdab979 8release = 2
803dc34f 9
802ea3af
MT
10maintainer = Michael Tremer <michael.tremer@ipfire.org>
11groups = Base Build System/Base
12url =
13license = Public Domain
14summary = The basic directory layout for a Linux system.
803dc34f 15
802ea3af 16description
803dc34f
MT
17 The filesystem package is one of the basic packages that is installed
18 on a Linux system. Filesystem contains the basic directory layout
19 for a Linux operating system, including the correct permissions for
20 the directories.
802ea3af
MT
21end
22
23# No tarball.
24sources =
803dc34f 25
802ea3af 26build
f43b253b
MT
27 # Pakfire supports python scriptlets since
28 # version 0.9.22.
29 requires
30 pakfire-builder >= 0.9.22
31 end
32
802ea3af 33 DIR_APP = %{DIR_SRC}
803dc34f 34
802ea3af
MT
35 build
36 : # Nothing to do
37 end
803dc34f 38
802ea3af
MT
39 install
40 cd %{BUILDROOT}
41 mkdir -pv \
802ea3af
MT
42 boot \
43 dev \
44 etc/pki \
45 etc/skel \
46 etc/sysconfig \
47 home \
802ea3af
MT
48 media \
49 mnt \
50 opt \
51 proc \
52 root \
53 run/lock \
802ea3af
MT
54 srv \
55 sys \
56 tmp \
57 usr/bin \
58 usr/include \
59 usr/lib \
b50ea81b 60 usr/%{lib} \
802ea3af 61 usr/lib/locale \
f43b253b 62 usr/lib/modules \
802ea3af
MT
63 usr/sbin \
64 usr/share/{aclocal,dict,doc,empty,info,mime-info,misc} \
65 usr/share/man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p} \
66 usr/src \
67 usr/local/bin \
68 usr/local/etc \
69 usr/local/lib \
70 usr/local/sbin \
71 usr/local/share \
72 usr/local/share/man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x} \
73 usr/local/share/info \
74 usr/local/include \
75 var/empty \
76 var/lib \
77 var/local \
802ea3af
MT
78 var/log \
79 var/nis \
80 var/preserve \
802ea3af
MT
81 var/spool/{mail,lpd} \
82 var/tmp \
83 var/db \
84 var/cache
803dc34f 85
f43b253b
MT
86 ln -snf usr/bin bin
87 ln -snf usr/sbin sbin
88 ln -snf usr/lib lib
89 [ "%{lib}" = "lib" ] || ln -snf usr/%{lib} %{lib}
90
802ea3af
MT
91 ln -snf ../var/tmp usr/tmp
92 ln -snf spool/mail var/mail
4cdab979
MT
93 ln -snf ../run var/run
94 ln -snf ../run/lock var/lock
803dc34f 95
802ea3af
MT
96 # Setting correct permissions.
97 chmod 1777 %{BUILDROOT}/{,var/}tmp
98 chown root:mail %{BUILDROOT}/var/spool/mail
99 chmod 775 %{BUILDROOT}/var/spool/mail
100 end
1f9bc2f0
MT
101
102 # XXX not implemented at the moment
802ea3af
MT
103 export QUALITY_AGENT_NO_DIRECTORY_CHECK = yes
104 export QUALITY_AGENT_NO_DIRECTORY_PRUNE = yes
105end
803dc34f 106
802ea3af
MT
107packages
108 package %{name}
109 prerequires = setup
f43b253b
MT
110
111 # We do not know, if the filesystem package is the first
112 # in the transaction, so we create the symlinks prior to running
113 # the transaction.
114 script pretransin python
115 if not os.path.exists("/usr"):
116 os.makedirs("/usr")
117
118 for dir in ("/lib", "/%{lib}", "/sbin", "/bin"):
119 usr_dir = "/usr%s" % dir
120
121 if not os.path.exists(usr_dir):
122 os.makedirs(usr_dir)
123
4cdab979
MT
124 try:
125 os.lstat(dir)
126 except OSError:
f43b253b
MT
127 os.symlink(usr_dir[1:], dir)
128 end
802ea3af 129 end
1f9bc2f0
MT
130
131 # Although this package is not noarch, it does not
132 # contain any binary data and thus has no debuginfo package.
802ea3af 133end