]> git.pld-linux.org Git - packages/FHS.git/blobdiff - FHS.spec
- added dirs for lt manuals
[packages/FHS.git] / FHS.spec
index 10d1236eba86f2830c452d2645677cdbad86ce8f..69611a997427f55cdb3c87806346ad2f707e82d0 100644 (file)
--- a/FHS.spec
+++ b/FHS.spec
@@ -1,4 +1,8 @@
-# NOTE: don't use %{_*dir} macros for paths defined by FHS
+# NOTE
+# - don't use %{_*dir} macros for paths defined by FHS
+
+# avoid rpm 4.4.9 adding rm -rf buildroot, we need the dirs to check consistency
+%define                __spec_clean_body       %{nil}
 Summary:       Basic FHS 2.3 filesystem layout
 Summary(de.UTF-8):     Grundlegende Dateisystemstruktur
 Summary(fr.UTF-8):     Arborescence de base du système de fichiers
@@ -6,16 +10,22 @@ Summary(pl.UTF-8):   Podstawowy układ katalogów systemu Linux zgodny z FHS 2.3
 Summary(tr.UTF-8):     Temel dosya sistemi yapısı
 Name:          FHS
 Version:       2.3
-Release:       17
+Release:       23
 License:       GPL
 Group:         Base
 URL:           http://www.pathname.com/fhs/
+BuildRequires: mktemp
 BuildRequires: rpmbuild(macros) >= 1.213
 Requires:      setup >= 2.4.6-4
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _locmandir      /usr/local/man
 
+# doesn't contain any files, but we're not noarch package
+%define        no_install_post_strip   1
+%define        no_install_post_chrpath 1
+%define        no_install_post_compress_modules        1
+
 %description
 This package contains the basic directory layout for a Linux system,
 including the proper permissions for the directories. This layout
@@ -54,7 +64,7 @@ install -d \
        $RPM_BUILD_ROOT/usr/share/{dict,doc,games,info,misc,tmac,xml} \
        $RPM_BUILD_ROOT/usr/lib/games \
        $RPM_BUILD_ROOT/usr/local/{bin,etc,games,include,lib,sbin,share/{doc,info},src} \
-       $RPM_BUILD_ROOT/var/{cache,crash,db,games,lib/misc,local,lock,log,mail,opt,run,spool,tmp}
+       $RPM_BUILD_ROOT/var/{cache,crash,db,games,lib/misc,local,lock,log,mail,opt,run,spool,tmp,yp}
 
 %if "%{_lib}" == "lib64"
 install -d $RPM_BUILD_ROOT{/lib64,/usr/lib64/games,/usr/local/lib64}
@@ -63,8 +73,8 @@ install -d $RPM_BUILD_ROOT{/lib64,/usr/lib64/games,/usr/local/lib64}
 for manp in man{1,2,3,4,5,6,7,8} ; do
        install -d $RPM_BUILD_ROOT/usr/share/man/${manp}
        install -d $RPM_BUILD_ROOT%{_locmandir}/${manp}
-       for mloc in bg ca cs da de el es fi fr gl hr hu id it ja ko nl pl pt \
-                   pt_BR ro ru sk sl sr sv tr uk zh_CN zh_TW ; do
+       for mloc in bg ca cs da de el eo es fi fr gl hr hu id it ja ko lt nl \
+                       pl pt pt_BR ro ru sk sl sr sv tr uk zh_CN zh_TW ; do
                install -d $RPM_BUILD_ROOT/usr/share/man/${mloc}/${manp}
        done
 done
@@ -75,19 +85,21 @@ ln -sf ../man $RPM_BUILD_ROOT/usr/local/share/man
 %clean
 cd $RPM_BUILD_ROOT
 
-# %{_rpmfilename} is not expanded, so use
-# %{name}-%{version}-%{release}.%{buildarch}.rpm
-RPMFILE=%{name}-%{version}-%{release}.%{_target_cpu}.rpm
-TMPFILE=%{name}-%{version}.tmp$$
-find . | sed -e 's|^\.||g' -e 's|^$||g' | sort | grep -v $TMPFILE > $TMPFILE
-
-# find finds also '.', so use option -B for diff
-if rpm -qpl %{_rpmdir}/$RPMFILE | grep -v '^/$' | sort | diff -uB $TMPFILE - ; then
-       rm -rf $RPM_BUILD_ROOT
-else
-       echo -e "\nNot so good, some directories are not included in package\n"
-       exit 1;
-fi
+check_filesystem_dirs() {
+       RPMFILE=%{name}-%{version}-%{release}.%{_target_cpu}.rpm
+       TMPFILE=$(mktemp)
+       find | sed -e 's|^\.||g' -e 's|^$||g' | LC_ALL=C sort > $TMPFILE
+
+       # find finds also '.', so use option -B for diff
+       if rpm -qpl %{_rpmdir}/$RPMFILE | grep -v '^/$' | LC_ALL=C sort | diff -uB $TMPFILE - ; then
+               rm -rf $RPM_BUILD_ROOT
+       else
+               echo -e "\nNot so good, some directories are not included in package\n"
+               exit 1
+       fi
+       rm -f $TMPFILE
+}
+check_filesystem_dirs
 
 %files
 %defattr(644,root,root,755)
@@ -131,6 +143,7 @@ fi
 %lang(da) /usr/share/man/da
 %lang(de) /usr/share/man/de
 %lang(el) /usr/share/man/el
+%lang(eo) /usr/share/man/eo
 %lang(es) /usr/share/man/es
 %lang(fi) /usr/share/man/fi
 %lang(fr) /usr/share/man/fr
@@ -141,6 +154,7 @@ fi
 %lang(it) /usr/share/man/it
 %lang(ja) /usr/share/man/ja
 %lang(ko) /usr/share/man/ko
+%lang(lt) /usr/share/man/lt
 %lang(nl) /usr/share/man/nl
 %lang(pl) /usr/share/man/pl
 %lang(pt) /usr/share/man/pt
@@ -186,6 +200,7 @@ fi
 %dir /var/opt
 %dir /var/run
 %dir /var/spool
+%dir /var/yp
 %attr(1777,root,root) %dir /var/tmp
 %if "%{_lib}" == "lib64"
 %dir /lib64
This page took 0.077932 seconds and 4 git commands to generate.