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

Revision 6, 3.8 KB (checked in by jhuntwork, 10 months ago)

Use a more FHS-compatible info directory location

Line 
1Summary: Base directory layout
2Name: base-layout
3Version: 0.1
4Release: 2
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/{dict,doc,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> %{name}.man
35for man in man{{1..9}{,x},{0,1,3}p,n}; do
36        mkdir -p %{buildroot}/usr/share/man/$man
37        echo "%dir %ghost /usr/share/man/$man" >> %{name}.man
38done
39for loc in bg cs da de el en eo es fi fr hr hu id it ja ko nl pl pt pt_BR \
40  ro ru sk sl sv tr zh_CN zh_TW; do
41        mkdir -p %{buildroot}/usr/share/man/${loc}/man{1..9}
42        echo "%dir %ghost %lang(${loc}) /usr/share/man/${loc}" >> %{name}.man
43        echo "%dir %ghost %lang(${loc}) /usr/share/man/${loc}/*" >> %{name}.man
44done
45
46> %{name}.lang
47egrep -vh '^($|#)' %{SOURCE0} %{SOURCE1} | while read loc; do
48        echo $loc | grep -q '@' && locale=${loc%%@*} || locale=$loc
49        mkdir -p %{buildroot}/usr/share/locale/${loc}/LC_{MESSAGES,TIME}
50        echo "%dir %ghost %lang(${locale}) /usr/share/locale/${loc}" \
51                >> %{name}.lang
52        echo "%dir %ghost %lang(${locale}) /usr/share/locale/${loc}/LC_MESSAGES" \
53                >> %{name}.lang
54        echo "%dir %ghost %lang(${locale}) /usr/share/locale/${loc}/LC_TIME" \
55                >> %{name}.lang
56done
57
58cat  %{name}.man %{name}.lang > %{name}.files
59
60# multilib directories
61%if "%{_lib}" != "lib"
62  install -dv %{buildroot}/{usr/,}%{_lib}
63%endif
64
65%clean
66rm -rf %{buildroot}
67
68%files -f %{name}.files
69%defattr(-,root,root)
70%dir /
71%dir /bin
72%dir /boot
73%dir /dev
74%dir /etc
75%dir /home
76%dir /lib
77%if "%{_lib}" != "lib"
78%dir /%{_lib}
79%endif
80%dir /media
81%dir /media/floppy
82%dir /media/cdrom
83%dir /mnt
84%dir /opt
85%dir /proc
86%attr(0750,root,root) %dir /root
87%dir /sbin
88%dir /srv
89%dir /sys
90%attr(1777,root,root) %dir /tmp
91%dir /usr
92%dir /usr/bin
93%dir /usr/include
94%dir /usr/lib
95%if "%{_lib}" != "lib"
96%dir /usr/%{_lib}
97%endif
98%dir /usr/local
99%dir /usr/local/bin
100%dir /usr/local/include
101%dir /usr/local/lib
102%dir /usr/local/sbin
103%dir /usr/local/share
104%dir /usr/local/share/doc
105%dir /usr/local/share/info
106%dir /usr/local/share/locale
107/usr/local/share/man
108%dir /usr/local/share/misc
109%dir /usr/local/share/terminfo
110%dir /usr/local/share/zoneinfo
111%dir /usr/local/src
112%dir /usr/sbin
113%dir /usr/share
114%dir /usr/share/dict
115%dir /usr/share/doc
116%dir /usr/share/info
117%dir /usr/share/locale
118%dir /usr/share/man
119%dir /usr/share/misc
120%dir /usr/share/terminfo
121%dir /usr/share/zoneinfo
122%dir /usr/src
123%dir /var
124%dir /var/cache
125%dir /var/lib
126%dir /var/lib/misc
127%dir /var/lib/locate
128%dir /var/local
129%dir /var/lock
130%dir /var/log
131%dir /var/mail
132%dir /var/opt
133%dir /var/run
134%dir /var/spool
135%dir /var/spool/repackage
136%attr(1777,root,root) %dir /var/tmp
137
138%changelog
139* Fri Oct 30 2009 Jeremy Huntwork <jhuntwork@lightcubesolutions.com> - 0.1-2
140- Restructure man directories to be FHS compliant
141
142* Sun Oct 25 2009 Jeremy Huntwork <jhuntwork@lightcubesolutions.com> - 0.1-1
143- Added a new locale
144
145* Wed Sep 9 2009 Jeremy Huntwork <jhuntwork@lightcubesolutions.com> - 0.0-2
146- Added /usr/share/dict as one of the base directories
147
148* Sat Jul 18 2009 Jeremy Huntwork <jhuntwork@lightcubesolutions.com> - 0.0-1
149- Initial version
Note: See TracBrowser for help on using the browser.