/[packages]/cauldron/filesystem/current/SPECS/filesystem.spec
ViewVC logotype

Contents of /cauldron/filesystem/current/SPECS/filesystem.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 273158 - (show annotations) (download)
Sat Jul 21 17:42:31 2012 UTC (11 years, 9 months ago) by colin
File size: 3264 byte(s)
Update for usrmove
1 Name: filesystem
2 Version: 2.1.9
3 Release: %mkrel 18
4 Summary: The basic directory layout for a Linux system
5 License: Public Domain
6 Group: System/Base
7 URL: http://www.mageia.org/
8
9 # RPM runtime check in the buildroot; this ensures we can not install the
10 # incompatible filesystem.rpm on unconverted systems
11 Requires: rpmlib(X-CheckUnifiedSystemdir)
12
13 %description
14 The filesystem package is one of the basic packages that is installed on
15 a Mageia Linux system. Filesystem contains the basic directory layout
16 for a Linux operating system, including the correct permissions for the
17 directories.
18
19 %install
20 cd %{buildroot}
21
22 mkdir -p mnt media boot
23 mkdir -p opt proc root sys tmp
24 mkdir -p home initrd srv
25
26 mkdir -p %{buildroot}%{_sysconfdir}/{profile.d,security,ssl,sysconfig,default,opt,xinetd.d}
27
28 mkdir -p %{buildroot}%{_prefix}/{etc,src,lib}
29 mkdir -p %{buildroot}{%{_bindir},%{_libdir},%{_includedir},%{_sbindir},%{_datadir}}
30 mkdir -p %{buildroot}%{_datadir}/{misc,pixmaps,applications,desktop-directories,dict,doc,empty,fonts}
31 mkdir -p %{buildroot}%{_datadir}/color/{icc,cmms,settings}
32
33 ln -snf usr/bin
34 ln -snf usr/sbin
35 ln -snf usr/lib
36 ln -snf usr/%{_lib}
37
38 mkdir -p lib/modules
39
40 # man
41 mkdir -p %{buildroot}/%{_mandir}/man{1,2,3,4,5,6,7,8,9,n}
42 mkdir -p %{buildroot}/%{_infodir}
43 # games
44 mkdir -p %{buildroot}/{%{_gamesbindir},%{_gamesdatadir}}
45 mkdir -p %{buildroot}/{%{_libdir},%{_prefix}/lib}/games
46
47 mkdir -p %{buildroot}/%{_libdir}/gcc-lib
48 mkdir -p %{buildroot}/%{_prefix}/lib/gcc-lib
49
50 mkdir -p usr/local/{bin,doc,etc,games,lib,%{_lib},sbin,src,libexec,include}
51 mkdir -p usr/local/share/{applications,desktop-directories}
52 mkdir -p usr/local/share/{man/man{1,2,3,4,5,6,7,8,9,n},info}
53 mkdir -p usr/share/ppd
54
55 mkdir -p run
56 mkdir -p var/{local,log,nis,preserve,lib,empty}
57 mkdir -p var/spool/{mail,lpd}
58 mkdir -p var/lib/{games,misc}
59 mkdir -p var/{tmp,db,cache/man,opt,games,yp}
60
61 ln -snf ../run var/run
62 ln -snf ../run/lock var/lock
63
64 ln -snf ../var/tmp usr/tmp
65 ln -snf spool/mail var/mail
66
67 %pretrans -p <lua>
68 --#
69 --# If we are running in pretrans in a fresh root, there is no /usr and symlinks.
70 --# We cannot be sure, to be the very first rpm in the transaction list,
71 --# so, let's create the toplevel symlinks here and the directories they point to.
72 --# When our rpm is unpacked by cpio, it will set all permissions and modes later.
73 --#
74
75 if posix.stat("/usr") == nil then
76 posix.mkdir("/usr")
77 end
78
79 for i,dir in ipairs({"/lib", "/%{_lib}", "/sbin", "/bin"}) do
80 if posix.stat("/usr"..dir) == nil then
81 posix.mkdir("/usr"..dir)
82 if posix.stat(dir, "mode") == nil then
83 posix.symlink("usr"..dir, dir)
84 end
85 end
86 end
87
88 return 0
89
90 %post -p <lua>
91 posix.symlink("../run", "/var/run")
92 posix.symlink("../run/lock", "/var/lock")
93
94 %files
95 %defattr(0755,root,root)
96 /bin
97 /boot
98 /etc
99 /home
100 /initrd
101 /lib
102 /srv
103 %if %{_lib} != lib
104 /%{_lib}
105 %endif
106 %_sysconfdir/xinetd.d
107 %dir /media
108 %dir /mnt
109 %dir /opt
110 /proc
111 /sys
112 %attr(750,root,root) /root
113 /run
114 /sbin
115 %attr(1777,root,root) /tmp
116 %{_prefix}
117 %dir /var
118 /var/db
119 /var/lib
120 /var/local
121 /var/empty
122 /var/lock
123 /var/cache
124 /var/log
125 /var/mail
126 /var/nis
127 /var/opt
128 /var/preserve
129 /var/run
130 %dir /var/spool
131 %attr(0755,root,daemon) %dir /var/spool/lpd
132 %attr(775,root,mail) /var/spool/mail
133 %attr(1777,root,root) /var/tmp
134 /var/yp

  ViewVC Help
Powered by ViewVC 1.1.30