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