#
# Conditional build:
-# _without_nls - without NLS
-# _with_allstatic - link everything statically
+%bcond_with allstatic # link everythink statically
+%bcond_without nls # build without NLS
#
Summary: Utilities for managing the second extended (ext2) filesystem
Summary(cs): Nástroje pro správu souborových systémù typu ext2
Summary(zh_CN): ¹ÜÀíµÚ¶þÀ©Õ¹£¨ext2£©ÎļþϵͳµÄ¹¤¾ß¡£
Summary(zh_TW): ¥Î©óºÞ²z ext2 Àɮרt²Îªº¤u¨ãµ{¦¡¡C
Name: e2fsprogs
-Version: 1.33
-Release: 2
+Version: 1.34
+Release: 8
License: GPL
Group: Applications/System
Source0: http://dl.sourceforge.net/e2fsprogs/%{name}-%{version}.tar.gz
+# Source0-md5: 9be9375224f0970a55e39ebebf2a0ce5
Source1: http://opensource.captech.com/e2compr/ftp/e2compr-0.4.texinfo.gz
+# Source1-md5: c3c59ff37e49d8759abb1ef95a8d3abf
Source2: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
+# Source2-md5: 992a37783bd42a897232972917e8ca7d
Source3: %{name}-pl.po
Patch0: %{name}-info.patch
Patch1: e2compr-info.patch
-Patch2: %{name}-po.patch
-Patch3: %{name}-missing-nls.patch
-Patch4: %{name}-nostrip.patch
-Patch5: %{name}-potfiles-update.patch
+Patch2: %{name}-nostrip.patch
+Patch3: %{name}-et-fixes.patch
+Patch4: %{name}-no-empty-gettext.patch
+Patch5: %{name}-scsi_major.patch
URL: http://e2fsprogs.sourceforge.net/
BuildRequires: automake
BuildRequires: autoconf
-BuildRequires: gettext-devel
+BuildRequires: gettext-devel >= 0.11
BuildRequires: texinfo
Requires(post,postun): /sbin/ldconfig
+Requires: libcom_err = %{version}
+Requires: libuuid = %{version}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Obsoletes: libext2fs2
Summary(zh_TW): ext2 Àɮרt²Î¯S©wªºÀRºA¨ç¦¡®w»PªíÀY¡C
Group: Development/Libraries
Requires: %{name} = %{version}
+Requires: libcom_err-devel = %{version}
+Requires: libuuid-devel = %{version}
Obsoletes: libext2fs2-devel
%description devel
%description evms -l pl
Modu³ e2fs dla EVMS.
+%package -n libcom_err
+Summary: A Common Error Description Library for unices
+Summary(pl): Biblioteka opisu popularnych b³êdów dla uniksów
+Group: Libraries
+Conflicts: e2fsprogs < 1.34-3
+
+%description -n libcom_err
+A Common Error Description Library for unices.
+
+%description -n libcom_err -l pl
+Biblioteka opisu popularnych b³êdów dla uniksów.
+
+%package -n libcom_err-devel
+Summary: Development files for Common Error Description Library for unices
+Summary(pl): Pliki dla programistów do biblioteki opisu popularnych b³êdów dla uniksów
+Group: Development/Libraries
+Requires: libcom_err = %{version}
+Conflicts: e2fsprogs-devel < 1.34-3
+
+%description -n libcom_err-devel
+A Common Error Description Library for unices - development files.
+
+%description -n libcom_err-devel -l pl
+Biblioteka opisu popularnych b³êdów dla uniksów - pliki dla
+programistów.
+
+%package -n libcom_err-static
+Summary: Static version of Common Error Description Library for unices
+Summary(pl): Statyczna biblioteka opisu popularnych b³êdów dla uniksów
+Group: Development/Libraries
+Requires: libcom_err-devel = %{version}
+Conflicts: e2fsprogs-static < 1.34-3
+
+%description -n libcom_err-static
+A Common Error Description Library for unices - static version.
+
+%description -n libcom_err-static -l pl
+Biblioteka opisu popularnych b³êdów dla uniksów - wersja statyczna.
+
+%package -n libuuid
+Summary: Library for accessing and manipulating UUID
+Summary(pl): Biblioteka umo¿liwiaj±ca dostêp i zmiany UUID
+Group: Libraries
+Conflicts: e2fsprogs < 1.34-3
+
+%description -n libuuid
+Library for accessing and manipulating UUID.
+
+%description -n libuuid -l pl
+Biblioteka umo¿liwiaj±ca dostêp i zmiany UUID.
+
+%package -n libuuid-devel
+Summary: Header files for library for accessing and manipulating UUID
+Summary(pl): Pliki nag³ówkowe biblioteki umo¿liwiaj±cej dostêp i zmiany UUID
+Group: Development/Libraries
+Requires: libuuid = %{version}
+Conflicts: e2fsprogs-devel < 1.34-3
+
+%description -n libuuid-devel
+Library for accessing and manipulating UUID - development files.
+
+%description -n libuuid-devel -l pl
+Biblioteka umo¿liwiaj±ca dostêp i zmiany UUID - pliki dla
+programistów.
+
+%package -n libuuid-static
+Summary: Static library for accessing and manipulating UUID
+Summary(pl): Statyczna biblioteka umo¿liwiaj±ca dostêp i zmiany UUID
+Group: Development/Libraries
+Requires: libuuid-devel = %{version}
+Conflicts: e2fsprogs-static < 1.34-3
+
+%description -n libuuid-static
+Library for accessing and manipulating UUID - static version.
+
+%description -n libuuid-static -l pl
+Biblioteka umo¿liwiaj±ca dostêp i zmiany UUID - wersja statyczna.
+
%prep
-%setup -q
+%setup -q
%patch0 -p1
gunzip < %{SOURCE1} > doc/e2compr.texinfo
%patch1 -p1
%patch4 -p1
%patch5 -p1
-mv -f po/de{-utf,}.po
+chmod u+w configure aclocal.m4 po/LINGUAS po/Makefile.in.in intl/Makefile.in
+
+LINGUAS=$(cat po/LINGUAS)
+echo "pl $LINGUAS" > po/LINGUAS
cp -f %{SOURCE3} po/pl.po
%build
-chmod u+w configure aclocal.m4
+rm -f config.sub
+cp /usr/share/automake/config.sub .
%{__gettextize}
%{__aclocal}
%{__autoconf}
%configure \
- --with-root-prefix=/ \
- %{!?_without_nls:--enable-nls} \
- %{?_without_nls:--disable-nls} \
- %{?_with_allstatic:--disable-elf-shlibs} \
- %{!?_with_allstatic:--enable-elf-shlibs} \
+ --with-root-prefix="" \
+ %{?with_nls:--enable-nls} \
+ %{!?with_nls:--disable-nls} \
+ %{?with_allstatic:--disable-elf-shlibs} \
+ %{!?with_allstatic:--enable-elf-shlibs} \
--enable-compression \
+ --enable-htree \
+ --enable-evms-11 \
%{?_without_static:--enable-dynamic-e2fsck} \
- --enable-fsck
+ --enable-fsck \
+ --disable-rpath
+
+%{__make} libs \
+ LDFLAGS="%{rpmldflags}"
+%{__make} progs \
+ LDFLAGS="%{rpmldflags}"
+%{__make} docs \
+ LDFLAGS="%{rpmldflags}"
-%{__make} libs LDFLAGS="%{rpmldflags}"
-%{__make} progs LDFLAGS="%{rpmldflags}"
-%{__make} docs LDFLAGS="%{rpmldflags}"
cd doc
makeinfo --no-split e2compr.texinfo
-cd ..
%install
rm -rf $RPM_BUILD_ROOT
export PATH=/sbin:$PATH
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
-%{__make} install-libs DESTDIR=$RPM_BUILD_ROOT
-%{__make} -C po install DESTDIR=$RPM_BUILD_ROOT
+echo "install-shlibs:" >> intl/Makefile
+
+%{__make} install \
+ root_libdir=/%{_lib} \
+ DESTDIR=$RPM_BUILD_ROOT
+%{__make} install-libs \
+ root_libdir=/%{_lib} \
+ DESTDIR=$RPM_BUILD_ROOT
+%{__make} -C po install \
+ root_libdir=/%{_lib} \
+ DESTDIR=$RPM_BUILD_ROOT
ln -sf e2fsck $RPM_BUILD_ROOT/sbin/fsck.ext2
ln -sf e2fsck $RPM_BUILD_ROOT/sbin/fsck.ext3
echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/$a/man8/mkfs.ext2.8
echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/$a/man8/mkfs.ext3.8
-%{!?_without_nls:%find_lang %{name}}
+%if %{with nls}
+[ "`file $RPM_BUILD_ROOT%{_datadir}/locale/it/LC_MESSAGES/e2fsprogs.mo |\
+ sed -e 's/.*,//' -e 's/message.*//'`" -le 1 ] && rm -f $f
+%find_lang %{name}
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
%postun devel
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
-%files %{!?_without_nls:-f %{name}.lang}
+%post -n libcom_err -p /sbin/ldconfig
+%postun -n libcom_err -p /sbin/ldconfig
+
+%post -n libuuid -p /sbin/ldconfig
+%postun -n libuuid -p /sbin/ldconfig
+
+%files %{?with_nls:-f %{name}.lang}
%defattr(644,root,root,755)
%doc ChangeLog README RELEASE-NOTES
%attr(755,root,root) /sbin/*
%attr(755,root,root) %{_sbindir}/*
-%attr(755,root,root) %{_bindir}/*
-%{!?_with_allstatic:%attr(755,root,root) /lib/lib*.so.*}
-%{_mandir}/man[18]/*
+%attr(755,root,root) %{_bindir}/*attr
+%attr(755,root,root) %{_bindir}/mk_cmds
+%if ! %{with allstatic}
+%attr(755,root,root) /%{_lib}/libblkid.so.*.*
+%attr(755,root,root) /%{_lib}/libe2p.so.*.*
+%attr(755,root,root) /%{_lib}/libext2fs.so.*.*
+%attr(755,root,root) /%{_lib}/libss.so.*.*
+%endif
+%{_mandir}/man1/*attr.1*
+%{_mandir}/man1/mk_cmds.1*
+%{_mandir}/man8/*
%lang(fi) %{_mandir}/fi/man[18]/*
%lang(fr) %{_mandir}/fr/man[18]/*
%lang(hu) %{_mandir}/hu/man[18]/*
%lang(it) %{_mandir}/it/man[18]/*
-%lang(ja) %{_mandir}/ja/man[18]/*
+%lang(ja) %{_mandir}/ja/man1/*attr.1*
+%lang(ja) %{_mandir}/ja/man8/*
%lang(ko) %{_mandir}/ko/man[18]/*
%lang(pl) %{_mandir}/pl/man[18]/*
-%{_datadir}/et
%{_datadir}/ss
%{_infodir}/e2compr.info*
%files devel
%defattr(644,root,root,755)
%doc doc/libblkid.txt
+%if ! %{with allstatic}
+%attr(755,root,root) %{_libdir}/libblkid.so
+%attr(755,root,root) %{_libdir}/libe2p.so
+%attr(755,root,root) %{_libdir}/libext2fs.so
+%attr(755,root,root) %{_libdir}/libss.so
+%endif
+%{_includedir}/blkid
+%{_includedir}/e2p
+%{_includedir}/ext2fs
+%{_includedir}/ss
%{_infodir}/libext2fs.info*
-%{_mandir}/man3/*
-%lang(ja) %{_mandir}/ja/man3/*
-%{_includedir}/*
-
-%{!?_with_allstatic:%attr(755,root,root) %{_libdir}/lib*.so}
+%{_mandir}/man3/libblkid.3*
%files static
%defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libblkid.a
+%{_libdir}/libe2p.a
+%{_libdir}/libext2fs.a
+%{_libdir}/libss.a
%files evms
%defattr(644,root,root,755)
-%attr(755,root,root) /lib/evms/*.so
+%attr(755,root,root) /%{_lib}/evms/*.so
+
+%files -n libcom_err
+%defattr(644,root,root,755)
+%{!?with_allstatic:%attr(755,root,root) /%{_lib}/libcom_err.so.*.*}
+
+%files -n libcom_err-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/compile_et
+%{!?with_allstatic:%attr(755,root,root) %{_libdir}/libcom_err.so}
+%{_includedir}/et
+%{_datadir}/et
+%{_mandir}/man1/compile_et.1*
+%lang(ja) %{_mandir}/ja/man1/compile_et.1*
+%{_mandir}/man3/com_err.3*
+%lang(ja) %{_mandir}/ja/man3/com_err.3*
+
+%files -n libcom_err-static
+%defattr(644,root,root,755)
+%{_libdir}/libcom_err.a
+
+%files -n libuuid
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/uuidgen
+%{!?with_allstatic:%attr(755,root,root) /%{_lib}/libuuid.so.*.*}
+%{_mandir}/man1/uuidgen.1*
+%lang(ja) %{_mandir}/ja/man1/uuidgen.1*
+
+%files -n libuuid-devel
+%defattr(644,root,root,755)
+%{!?with_allstatic:%attr(755,root,root) %{_libdir}/libuuid.so}
+%{_includedir}/uuid
+%{_mandir}/man3/*uuid*
+%lang(ja) %{_mandir}/ja/man3/*uuid*
+
+%files -n libuuid-static
+%defattr(644,root,root,755)
+%{_libdir}/libuuid.a