--- /dev/null
+%define _root_sbindir /sbin
+%define _root_libdir /%{_lib}
+%define _root_localedir /usr/share/locale
+%define _root_etcdir /etc
+
+Name: e2fs-static
+Summary: Utilities for managing ext2/ext3/ext4 filesystems
+Version: 1.41.11
+Release: 1
+Group: System Environment/Base
+License: GPLv2
+Source0: %{name}-%{version}.tar.gz
+Requires(pre): /sbin/ldconfig
+BuildRequires: pkgconfig
+BuildRequires: cmake
+BuildRequires: gettext
+BuildRequires: texinfo-tex
+BuildRoot: %{_tmppath}/%{name}-root
+
+%description
+The e2fsprogs package contains a number of utilities for creating,
+checking, modifying, and correcting any inconsistencies in ext2, ext3,
+and ext4 filesystems. E2fsprogs contains e2fsck (used to repair
+filesystem inconsistencies after an unclean shutdown), mke2fs (used to
+initialize a partition to contain an empty ext2 filesystem), debugfs
+(used to examine the internal structure of a filesystem, to manually
+repair a corrupted filesystem or to create test cases for e2fsck),
+tune2fs (used to modify filesystem parameters), resize2fs to grow and
+shrink unmounted ext2 filesystems, and most of the other core ext2fs
+filesystem utilities.
+
+You should install the e2fsprogs package if you are using any ext2,
+ext3, or ext4 filesystems (if you're not sure, you probably should
+install this package). You may also need to install it (even if you
+don't use ext2/ext3/ext4) for the libuuid and libblkid libraries and
+fsck tool that are included here.
+
+%package devel
+Summary: Ext2 filesystem-specific static libraries and headers.
+Group: Development/Libraries
+Requires: e2fsprogs = %{version}
+Requires: install-info
+
+%description devel
+E2fsprogs-devel contains the libraries and header files needed to
+develop ext2, ext3, or ext4 filesystem-specific programs.
+
+You should install e2fsprogs-devel if you want to develop
+ext2. ext3. or ext4 filesystem-specific programs. If you install
+e2fsprogs-devel, you'll also want to install e2fsprogs.
+
+%prep
+%setup
+
+%build
+%configure --enable-elf-shlibs --enable-nls \
+ %{?extra_config_flags:%extra_config_flags}
+make
+#make check
+
+%install
+rm -rf $RPM_BUILD_ROOT
+export PATH=/sbin:$PATH
+make install install-libs DESTDIR="$RPM_BUILD_ROOT" \
+ root_sbindir=%{_root_sbindir} root_libdir=%{_root_libdir}
+/sbin/ldconfig -n ${RPM_BUILD_ROOT}%{_libdir}
+
+#%find_lang %{name}
+chmod -R u+w %{buildroot}/*
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%post devel
+if [ -x /sbin/install-info -a -f %{_infodir}/libext2fs.info.gz ]; then
+ /sbin/install-info %{_infodir}/libext2fs.info.gz %{_infodir}/dir
+fi
+exit 0
+
+%postun devel
+if [ $1 = 0 -a -x /sbin/install-info -a -f %{_infodir}/libext2fs.info.gz ]; then
+ /sbin/install-info --delete %{_infodir}/libext2fs.info.gz %{_infodir}/dir
+fi
+exit 0
+
+#%files -f %{name}.lang
+%files
+%defattr(-,root,root,-)
+%doc README RELEASE-NOTES
+
+%{_root_localedir}/*/LC_MESSAGES/e2fsprogs.mo
+%{_root_sbindir}/badblocks
+%{_root_sbindir}/blkid
+%{_root_sbindir}/debugfs
+%{_root_sbindir}/dumpe2fs
+%{_root_sbindir}/e2fsck
+%{_root_sbindir}/e2image
+%{_root_sbindir}/e2label
+%{_root_sbindir}/e2undo
+%{_root_sbindir}/findfs
+%{_root_sbindir}/fsck
+%{_root_sbindir}/fsck.ext2
+%{_root_sbindir}/fsck.ext3
+%{_root_sbindir}/fsck.ext4
+%{_root_sbindir}/fsck.ext4dev
+%{_root_sbindir}/logsave
+%{_root_sbindir}/mke2fs
+%{_root_etcdir}/mke2fs.conf
+%{_root_sbindir}/mkfs.ext2
+%{_root_sbindir}/mkfs.ext3
+%{_root_sbindir}/mkfs.ext4
+%{_root_sbindir}/mkfs.ext4dev
+%{_root_sbindir}/resize2fs
+%{_root_sbindir}/tune2fs
+%{_sbindir}/filefrag
+%{_sbindir}/mklost+found
+%{_sbindir}/e2freefrag
+
+%{_root_libdir}/libblkid.so.*
+%{_root_libdir}/libcom_err.so.*
+%{_root_libdir}/libe2p.so.*
+%{_root_libdir}/libext2fs.so.*
+%{_root_libdir}/libss.so.*
+%{_root_libdir}/libuuid.so.*
+
+%{_libdir}/e2initrd_helper
+
+%{_bindir}/chattr
+%{_bindir}/lsattr
+%{_bindir}/uuidgen
+%{_mandir}/man1/chattr.1*
+%{_mandir}/man1/lsattr.1*
+%{_mandir}/man1/uuidgen.1*
+
+%{_mandir}/man5/e2fsck.conf.5*
+%{_mandir}/man5/mke2fs.conf.5*
+
+%{_mandir}/man8/badblocks.8*
+%{_mandir}/man8/blkid.8*
+%{_mandir}/man8/debugfs.8*
+%{_mandir}/man8/dumpe2fs.8*
+%{_mandir}/man8/e2fsck.8*
+%{_mandir}/man8/findfs.8*
+%{_mandir}/man8/fsck.ext2.8*
+%{_mandir}/man8/fsck.ext3.8*
+%{_mandir}/man8/fsck.ext4.8*
+%{_mandir}/man8/fsck.ext4dev.8*
+%{_mandir}/man8/e2image.8*
+%{_mandir}/man8/e2label.8*
+%{_mandir}/man8/e2undo.8*
+%{_mandir}/man8/fsck.8*
+%{_mandir}/man8/logsave.8*
+%{_mandir}/man8/mke2fs.8*
+%{_mandir}/man8/mkfs.ext2.8*
+%{_mandir}/man8/mkfs.ext3.8*
+%{_mandir}/man8/mkfs.ext4.8*
+%{_mandir}/man8/mkfs.ext4dev.8*
+%{_mandir}/man8/mklost+found.8*
+%{_mandir}/man8/resize2fs.8*
+%{_mandir}/man8/tune2fs.8*
+%{_mandir}/man8/filefrag.8*
+%{_mandir}/man8/e2freefrag.8*
+
+%files devel
+%defattr(-,root,root,-)
+%{_infodir}/libext2fs.info*
+%{_bindir}/compile_et
+%{_bindir}/mk_cmds
+
+%{_libdir}/libblkid.a
+%{_libdir}/libblkid.so
+%{_libdir}/libcom_err.a
+%{_libdir}/libcom_err.so
+%{_libdir}/libe2p.a
+%{_libdir}/libe2p.so
+%{_libdir}/libext2fs.a
+%{_libdir}/libext2fs.so
+%{_libdir}/libss.a
+%{_libdir}/libss.so
+%{_libdir}/libuuid.a
+%{_libdir}/libuuid.so
+
+%{_libdir}/pkgconfig/blkid.pc
+%{_libdir}/pkgconfig/com_err.pc
+%{_libdir}/pkgconfig/e2p.pc
+%{_libdir}/pkgconfig/ext2fs.pc
+%{_libdir}/pkgconfig/ss.pc
+%{_libdir}/pkgconfig/uuid.pc
+
+%{_datadir}/et
+%{_datadir}/ss
+%{_includedir}/blkid
+%{_includedir}/e2p
+%{_includedir}/et
+%{_includedir}/ext2fs
+%{_includedir}/ss
+%{_includedir}/uuid
+%{_mandir}/man1/compile_et.1*
+%{_mandir}/man1/mk_cmds.1*
+%{_mandir}/man3/com_err.3*
+%{_mandir}/man3/libblkid.3*
+%{_mandir}/man3/uuid.3*
+%{_mandir}/man3/uuid_clear.3*
+%{_mandir}/man3/uuid_compare.3*
+%{_mandir}/man3/uuid_copy.3*
+%{_mandir}/man3/uuid_generate.3*
+%{_mandir}/man3/uuid_generate_random.3*
+%{_mandir}/man3/uuid_generate_time.3*
+%{_mandir}/man3/uuid_is_null.3*
+%{_mandir}/man3/uuid_parse.3*
+%{_mandir}/man3/uuid_time.3*
+%{_mandir}/man3/uuid_unparse.3*
+%{_mandir}/man8/uuidd.8*
+%attr(6755, uuidd, uuidd) %{_sbindir}/uuidd
+++ /dev/null
-#
-# Please submit bugfixes or comments via http://bugs.meego.com/
-#
-
-%define _root_sbindir /sbin
-%define _root_libdir /%{_lib}
-
-Name: e2fsprogs
-Version: 1.41.11
-Release: 2
-# License tags based on COPYING file distinctions for various components
-License: GPLv2
-Summary: Utilities for managing ext2, ext3, and ext4 filesystems
-Group: System/Base
-Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
-Source1: ext2_types-wrapper.h
-Patch2: e2fsprogs-1.40.4-sb_feature_check_ignore.patch
-Patch3: meego-time-check-preen-ok.patch
-
-Url: http://e2fsprogs.sourceforge.net/
-BuildRequires: pkgconfig
-BuildRequires: pkgconfig(blkid)
-BuildRequires: pkgconfig(uuid)
-
-%description
-The e2fsprogs package contains a number of utilities for creating,
-checking, modifying, and correcting any inconsistencies in second,
-third and fourth extended (ext2/ext3/ext4) filesystems. E2fsprogs
-contains e2fsck (used to repair filesystem inconsistencies after an
-unclean shutdown), mke2fs (used to initialize a partition to contain
-an empty ext2 filesystem), debugfs (used to examine the internal
-structure of a filesystem, to manually repair a corrupted
-filesystem, or to create test cases for e2fsck), tune2fs (used to
-modify filesystem parameters), and most of the other core ext2fs
-filesystem utilities.
-
-You should install the e2fsprogs package if you need to manage the
-performance of an ext2, ext3, or ext4 filesystem.
-
-%package libs
-License: GPLv2 and LGPLv2
-Summary: Ext2/3/4 filesystem-specific shared libraries and headers
-Group: System/Libraries
-Requires(post): /sbin/ldconfig
-
-%description libs
-E2fsprogs-libs contains libe2p and libext2fs, the libraries of the
-e2fsprogs package.
-
-These libraries are used to directly acccess ext2/3/4 filesystems
-from userspace.
-
-%package devel
-License: GPLv2 and LGPLv2
-Summary: Ext2/3/4 filesystem-specific static libraries and headers
-Group: Development/Libraries
-Requires: e2fsprogs-libs = %{version}
-Requires: gawk
-Requires: pkgconfig(com_err)
-
-%description devel
-E2fsprogs-devel contains the libraries and header files needed to
-develop second, third and fourth extended (ext2/ext3/ext4)
-filesystem-specific programs.
-
-You should install e2fsprogs-devel if you want to develop ext2/3/4
-filesystem-specific programs. If you install e2fsprogs-devel, you'll
-also want to install e2fsprogs.
-
-%package -n libcom_err
-License: MIT
-Summary: Common error description library
-Group: System/Libraries
-
-%description -n libcom_err
-This is the common error description library, part of e2fsprogs.
-
-libcom_err is an attempt to present a common error-handling mechanism.
-
-%package -n libcom_err-devel
-License: MIT
-Summary: Common error description library
-Group: Development/Libraries
-Requires: libcom_err = %{version}
-Requires: pkgconfig
-
-%description -n libcom_err-devel
-This is the common error description development library and headers,
-part of e2fsprogs. It contains the compile_et commmand, used
-to convert a table listing error-code names and associated messages
-messages into a C source file suitable for use with the library.
-
-libcom_err is an attempt to present a common error-handling mechanism.
-
-%package -n libss
-License: MIT
-Summary: Command line interface parsing library
-Group: System/Libraries
-
-%description -n libss
-This is libss, a command line interface parsing library, part of e2fsprogs.
-
-This package includes a tool that parses a command table to generate
-a simple command-line interface parser, the include files needed to
-compile and use it, and the static libs.
-
-It was originally inspired by the Multics SubSystem library.
-
-%package -n libss-devel
-License: MIT
-Summary: Command line interface parsing library
-Group: Development/Libraries
-Requires: libss = %{version}
-Requires: pkgconfig
-
-%description -n libss-devel
-This is the command line interface parsing (libss) development library
-and headers, part of e2fsprogs. It contains the mk_cmds command, which
-parses a command table to generate a simple command-line interface parser.
-
-It was originally inspired by the Multics SubSystem library.
-
-%prep
-%setup -q -n e2fsprogs-%{version}
-# ignore some flag differences on primary/backup sb feature checks
-# mildly unsafe but 'til I get something better, avoid full fsck
-# after an selinux install...
-%patch2 -p1 -b .featurecheck
-%patch3 -p1
-
-%build
-%configure --enable-elf-shlibs --enable-nls --disable-e2initrd-helper --disable-libblkid --disable-uuidd --disable-libuuid
-#make %{?_smp_mflags} V=1
-make V=1
-
-%install
-export PATH=/sbin:$PATH
-make install install-libs DESTDIR=%{buildroot} INSTALL="install -p" \
- root_sbindir=%{_root_sbindir} root_libdir=%{_root_libdir}
-
-# ugly hack to allow parallel install of 32-bit and 64-bit -devel packages:
-%define multilib_arches %{ix86} x86_64
-
-%ifarch %{multilib_arches}
-mv -f %{buildroot}%{_includedir}/ext2fs/ext2_types.h \
- %{buildroot}%{_includedir}/ext2fs/ext2_types-%{_arch}.h
-install -p -m 644 %{SOURCE1} %{buildroot}%{_includedir}/ext2fs/ext2_types.h
-%endif
-
-%find_lang %{name}
-
-chmod -R u+w %{buildroot}/*
-
-%check
-%ifnarch %{arm} %{ix86}
-make check
-%endif
-
-%clean
-rm -rf %{buildroot}
-
-%post libs -p /sbin/ldconfig
-%postun libs -p /sbin/ldconfig
-
-%post -n libcom_err -p /sbin/ldconfig
-%postun -n libcom_err -p /sbin/ldconfig
-
-%post -n libss -p /sbin/ldconfig
-%postun -n libss -p /sbin/ldconfig
-
-%docs_package
-
-%lang_package
-
-
-%files
-%defattr(-,root,root,-)
-%doc README
-
-%config(noreplace) %{_sysconfdir}/mke2fs.conf
-%{_root_sbindir}/badblocks
-%{_root_sbindir}/debugfs
-%{_root_sbindir}/dumpe2fs
-%{_root_sbindir}/e2fsck
-%{_root_sbindir}/e2image
-%{_root_sbindir}/e2label
-%{_root_sbindir}/e2undo
-%{_root_sbindir}/fsck
-%{_root_sbindir}/fsck.ext2
-%{_root_sbindir}/fsck.ext3
-%{_root_sbindir}/fsck.ext4
-%{_root_sbindir}/fsck.ext4dev
-%{_root_sbindir}/logsave
-%{_root_sbindir}/mke2fs
-%{_root_sbindir}/mkfs.ext2
-%{_root_sbindir}/mkfs.ext3
-%{_root_sbindir}/mkfs.ext4
-%{_root_sbindir}/mkfs.ext4dev
-%{_root_sbindir}/resize2fs
-%{_root_sbindir}/tune2fs
-
-%{_sbindir}/filefrag
-%{_sbindir}/mklost+found
-%{_sbindir}/e2freefrag
-
-%{_bindir}/chattr
-%{_bindir}/lsattr
-
-%files libs
-%defattr(-,root,root)
-%{_root_libdir}/libe2p.so.*
-%{_root_libdir}/libext2fs.so.*
-
-%files devel
-%defattr(-,root,root)
-%{_libdir}/libe2p.a
-%{_libdir}/libe2p.so
-%{_libdir}/libext2fs.a
-%{_libdir}/libext2fs.so
-%{_libdir}/pkgconfig/e2p.pc
-%{_libdir}/pkgconfig/ext2fs.pc
-
-%{_includedir}/e2p
-%{_includedir}/ext2fs
-
-%files -n libcom_err
-%defattr(-,root,root)
-%{_root_libdir}/libcom_err.so.*
-
-%files -n libcom_err-devel
-%defattr(-,root,root)
-%{_bindir}/compile_et
-%{_libdir}/libcom_err.a
-%{_libdir}/libcom_err.so
-%{_datadir}/et
-%{_includedir}/et
-%{_libdir}/pkgconfig/com_err.pc
-
-%files -n libss
-%defattr(-,root,root)
-%{_root_libdir}/libss.so.*
-
-%files -n libss-devel
-%defattr(-,root,root)
-%{_bindir}/mk_cmds
-%{_libdir}/libss.a
-%{_libdir}/libss.so
-%{_datadir}/ss
-%{_includedir}/ss
-%{_libdir}/pkgconfig/ss.pc
-
-