root/lightcube_os/trunk/packages/base-layout/base-layout.spec @ 7

Revision 7, 4.2 KB (checked in by jhuntwork, 8 months ago)

Version updates and initial powerpc support

Line 
1Summary: Base directory layout
2Name: base-layout
3Version: 0.1
4Release: 3
5Group: System Environment/Base
6License: GPLv2
7Distribution: LightCube OS
8Vendor: LightCube Solutions
9Source0: http://dev.lightcube.us/~jhuntwork/sources/%{name}/lang-iso
10Source1: http://dev.lightcube.us/~jhuntwork/sources/%{name}/lang-exceptions
11
12Requires(postun): /
13
14%description
15Provides an empty filesystem layout with all necessary
16directories for a standard system.
17
18%prep
19
20%install
21# Top-level directories
22install -dv %{buildroot}/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,usr,var}
23
24install -dv %{buildroot}/media/{floppy,cdrom}
25install -dv %{buildroot}/usr/{,local/}{bin,include,lib,sbin,src}
26install -dv %{buildroot}/usr/{,local/}share/{aclocal,dict,doc,gtk-doc/html,info,locale}
27install -dv %{buildroot}/usr/{,local/}share/{misc,terminfo,zoneinfo}
28install -dv %{buildroot}/usr/share/man
29ln -sv ../../share/man %{buildroot}/usr/local/share/man
30install -dv %{buildroot}/var/{lock,log,mail,run,spool,tmp}
31install -dv %{buildroot}/var/spool/repackage
32install -dv %{buildroot}/var/{opt,cache,lib/{hwclock,misc,locate},local}
33
34%ifarch ppc
35install -dv %{buildroot}/usr/%{_lib}/nof
36%endif
37
38> %{name}.man
39for man in man{{1..9}{,x},{0,1,3}p,n}; do
40        mkdir -p %{buildroot}/usr/share/man/$man
41        echo "%dir %ghost /usr/share/man/$man" >> %{name}.man
42done
43for loc in bg cs da de el en eo es fi fr hr hu id it ja ko nl pl pt pt_BR \
44  ro ru sk sl sv tr zh_CN zh_TW; do
45        mkdir -p %{buildroot}/usr/share/man/${loc}/man{1..9}
46        echo "%dir %ghost %lang(${loc}) /usr/share/man/${loc}" >> %{name}.man
47        echo "%dir %ghost %lang(${loc}) /usr/share/man/${loc}/*" >> %{name}.man
48done
49
50> %{name}.lang
51egrep -vh '^($|#)' %{SOURCE0} %{SOURCE1} | while read loc; do
52        echo $loc | grep -q '@' && locale=${loc%%@*} || locale=$loc
53        mkdir -p %{buildroot}/usr/share/locale/${loc}/LC_{MESSAGES,TIME}
54        echo "%dir %ghost %lang(${locale}) /usr/share/locale/${loc}" \
55                >> %{name}.lang
56        echo "%dir %ghost %lang(${locale}) /usr/share/locale/${loc}/LC_MESSAGES" \
57                >> %{name}.lang
58        echo "%dir %ghost %lang(${locale}) /usr/share/locale/${loc}/LC_TIME" \
59                >> %{name}.lang
60done
61
62cat  %{name}.man %{name}.lang > %{name}.files
63
64# multilib directories
65%if "%{_lib}" != "lib"
66  install -dv %{buildroot}/{usr/,}%{_lib}
67%endif
68
69%clean
70rm -rf %{buildroot}
71
72%files -f %{name}.files
73%defattr(-,root,root)
74%dir /
75%dir /bin
76%dir /boot
77%dir /dev
78%dir /etc
79%dir /home
80%dir /lib
81%if "%{_lib}" != "lib"
82%dir /%{_lib}
83%endif
84%dir /media
85%dir /media/floppy
86%dir /media/cdrom
87%dir /mnt
88%dir /opt
89%dir /proc
90%attr(0750,root,root) %dir /root
91%dir /sbin
92%dir /srv
93%dir /sys
94%attr(1777,root,root) %dir /tmp
95%dir /usr
96%dir /usr/bin
97%dir /usr/include
98%dir /usr/lib
99%if "%{_lib}" != "lib"
100%dir /usr/%{_lib}
101%endif
102%ifarch ppc
103%dir /usr/%{_lib}/nof
104%endif
105%dir /usr/local
106%dir /usr/local/bin
107%dir /usr/local/include
108%dir /usr/local/lib
109%dir /usr/local/sbin
110%dir /usr/local/share
111%dir /usr/local/share/doc
112%dir /usr/local/share/info
113%dir /usr/local/share/locale
114%dir %ghost /usr/local/share/man
115%dir /usr/local/share/misc
116%dir /usr/local/share/terminfo
117%dir /usr/local/share/zoneinfo
118%dir /usr/local/src
119%dir /usr/sbin
120%dir /usr/share
121%dir /usr/share/aclocal
122%dir /usr/share/dict
123%dir /usr/share/doc
124%dir /usr/share/info
125%dir /usr/share/gtk-doc
126%dir /usr/share/gtk-doc/html
127%dir /usr/share/locale
128%dir /usr/share/man
129%dir /usr/share/misc
130%dir /usr/share/terminfo
131%dir /usr/share/zoneinfo
132%dir /usr/src
133%dir /var
134%dir /var/cache
135%dir /var/lib
136%dir /var/lib/misc
137%dir /var/lib/locate
138%dir /var/local
139%dir /var/lock
140%dir /var/log
141%dir /var/mail
142%dir /var/opt
143%dir /var/run
144%dir /var/spool
145%dir /var/spool/repackage
146%attr(1777,root,root) %dir /var/tmp
147
148%changelog
149* Sun Nov 01 2009 Jeremy Huntwork <jhuntwork@lightcubesolutions.com> - 0.1-3
150- Add /usr/share/aclocal and /usr/share/gtk-doc/html
151
152* Fri Oct 30 2009 Jeremy Huntwork <jhuntwork@lightcubesolutions.com> - 0.1-2
153- Restructure man directories to be FHS compliant
154
155* Sun Oct 25 2009 Jeremy Huntwork <jhuntwork@lightcubesolutions.com> - 0.1-1
156- Added a new locale
157
158* Wed Sep 9 2009 Jeremy Huntwork <jhuntwork@lightcubesolutions.com> - 0.0-2
159- Added /usr/share/dict as one of the base directories
160
161* Sat Jul 18 2009 Jeremy Huntwork <jhuntwork@lightcubesolutions.com> - 0.0-1
162- Initial version
Note: See TracBrowser for help on using the browser.