e2fsprogs.spec.in 6.35 KB
Newer Older
1 2
%define	_root_sbindir	/sbin
%define	_root_libdir	/%{_lib}
3
%define	_root_localedir	/usr/share/locale
4
%define	_root_etcdir	/etc
5

6
Summary: Utilities for managing the second extended (ext2) filesystem.
Theodore Ts'o's avatar
Theodore Ts'o committed
7
Name: e2fsprogs
8
Version: @E2FSPROGS_PKGVER@
Theodore Ts'o's avatar
Theodore Ts'o committed
9
Release: 0
10
License: GPLv2
11
Group: System Environment/Base
12 13
Source:  ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-%{version}.tar.gz
Url: http://e2fsprogs.sourceforge.net/
Theodore Ts'o's avatar
Theodore Ts'o committed
14
Prereq: /sbin/ldconfig
15
BuildRoot: %{_tmppath}/%{name}-root
Theodore Ts'o's avatar
Theodore Ts'o committed
16 17

%description
18
The e2fsprogs package contains a number of utilities for creating,
19 20 21 22 23 24 25 26 27
checking, modifying, and correcting any inconsistencies in second
extended (ext2) 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.
28 29 30

You should install the e2fsprogs package if you are using any ext2
filesystems (if you're not sure, you probably should install this
31 32 33
package).  You may also need to install it (even if you don't use
ext2) for the libuuid and libblkid libraries and fsck tool that are
included here.
Theodore Ts'o's avatar
Theodore Ts'o committed
34 35

%package devel
36
Summary: Ext2 filesystem-specific static libraries and headers.
Theodore Ts'o's avatar
Theodore Ts'o committed
37
Group: Development/Libraries
38 39
Requires: e2fsprogs = %{version}
Prereq: /sbin/install-info
Theodore Ts'o's avatar
Theodore Ts'o committed
40

Theodore Ts'o's avatar
Theodore Ts'o committed
41
%description devel
42 43 44 45
E2fsprogs-devel contains the libraries and header files needed to
develop second extended (ext2) filesystem-specific programs.

You should install e2fsprogs-devel if you want to develop ext2
Theodore Ts'o's avatar
Theodore Ts'o committed
46
filesystem-specific programs.  If you install e2fsprogs-devel, you'll
47
also want to install e2fsprogs.
Theodore Ts'o's avatar
Theodore Ts'o committed
48

49 50 51 52 53 54 55 56 57 58 59 60
%package -n uuidd
Summary: helper daemon to guarantee uniqueness of time-based UUIDs
Group: System Environment/Daemons
License: GPLv2
Requires: e2fsprogs = %{version}
Requires(pre): shadow-utils

%description -n uuidd
The uuidd package contains a userspace daemon (uuidd) which guarantees
uniqueness of time-based UUID generation even at very high rates on
SMP systems.

Theodore Ts'o's avatar
Theodore Ts'o committed
61 62 63
%prep
%setup

64
%build
65
%configure --enable-elf-shlibs --enable-nls
66
make
67
make check
Theodore Ts'o's avatar
Theodore Ts'o committed
68 69

%install
Theodore Ts'o's avatar
Theodore Ts'o committed
70
rm -rf $RPM_BUILD_ROOT
Theodore Ts'o's avatar
Theodore Ts'o committed
71
export PATH=/sbin:$PATH
72 73
make install install-libs DESTDIR="$RPM_BUILD_ROOT" \
	root_sbindir=%{_root_sbindir} root_libdir=%{_root_libdir}
74
/sbin/ldconfig -n ${RPM_BUILD_ROOT}%{_libdir}
75 76 77 78

# Add a dir that uuidd needs that the Makefiles don't create
install -d $RPM_BUILD_ROOT/var/lib/libuuid

79
%find_lang %{name}
Theodore Ts'o's avatar
Theodore Ts'o committed
80 81 82 83

%clean
rm -rf $RPM_BUILD_ROOT

84
%post -p /sbin/ldconfig
Theodore Ts'o's avatar
Theodore Ts'o committed
85

Theodore Ts'o's avatar
Theodore Ts'o committed
86 87 88
%postun -p /sbin/ldconfig

%post devel
89
if [ -x /sbin/install-info -a -f %{_infodir}/libext2fs.info.gz ]; then
90
    /sbin/install-info %{_infodir}/libext2fs.info.gz %{_infodir}/dir
Theodore Ts'o's avatar
Theodore Ts'o committed
91
fi
92
exit 0
Theodore Ts'o's avatar
Theodore Ts'o committed
93 94

%postun devel
95
if [ $1 = 0 -a -x /sbin/install-info -a -f %{_infodir}/libext2fs.info.gz ]; then
96
   /sbin/install-info --delete %{_infodir}/libext2fs.info.gz %{_infodir}/dir
Theodore Ts'o's avatar
Theodore Ts'o committed
97
fi
98
exit 0
Theodore Ts'o's avatar
Theodore Ts'o committed
99

100 101 102 103 104 105 106
%pre -n uuidd
getent group uuidd >/dev/null || groupadd -r uuidd
getent passwd uuidd >/dev/null || \
useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \
    -c "UUID generator helper daemon" uuidd
exit 0

107
%files -f %{name}.lang
Theodore Ts'o's avatar
Theodore Ts'o committed
108 109 110
%defattr(-,root,root)
%doc README RELEASE-NOTES

111
%{_root_sbindir}/badblocks
112
%{_root_sbindir}/blkid
113 114 115 116 117
%{_root_sbindir}/debugfs
%{_root_sbindir}/dumpe2fs
%{_root_sbindir}/e2fsck
%{_root_sbindir}/e2image
%{_root_sbindir}/e2label
118
%{_root_sbindir}/e2undo
119 120 121 122
%{_root_sbindir}/findfs
%{_root_sbindir}/fsck
%{_root_sbindir}/fsck.ext2
%{_root_sbindir}/fsck.ext3
123 124
%{_root_sbindir}/fsck.ext4
%{_root_sbindir}/fsck.ext4dev
125
%{_root_sbindir}/logsave
126
%{_root_sbindir}/mke2fs
127
%{_root_etcdir}/mke2fs.conf
128 129
%{_root_sbindir}/mkfs.ext2
%{_root_sbindir}/mkfs.ext3
130 131
%{_root_sbindir}/mkfs.ext4
%{_root_sbindir}/mkfs.ext4dev
132 133
%{_root_sbindir}/resize2fs
%{_root_sbindir}/tune2fs
134
%{_sbindir}/filefrag
135
%{_sbindir}/mklost+found
136

137
%{_root_libdir}/libblkid.so.*
138 139 140 141 142 143
%{_root_libdir}/libcom_err.so.*
%{_root_libdir}/libe2p.so.*
%{_root_libdir}/libext2fs.so.*
%{_root_libdir}/libss.so.*
%{_root_libdir}/libuuid.so.*

144 145
%{_libdir}/e2initrd_helper

146 147 148
%{_bindir}/chattr
%{_bindir}/lsattr
%{_bindir}/uuidgen
Theodore Ts'o's avatar
Theodore Ts'o committed
149 150 151 152
%{_mandir}/man1/chattr.1*
%{_mandir}/man1/lsattr.1*
%{_mandir}/man1/uuidgen.1*

153 154 155
%{_mandir}/man5/e2fsck.conf.5*
%{_mandir}/man5/mke2fs.conf.5*

Theodore Ts'o's avatar
Theodore Ts'o committed
156
%{_mandir}/man8/badblocks.8*
157
%{_mandir}/man8/blkid.8*
Theodore Ts'o's avatar
Theodore Ts'o committed
158 159 160
%{_mandir}/man8/debugfs.8*
%{_mandir}/man8/dumpe2fs.8*
%{_mandir}/man8/e2fsck.8*
161 162 163
%{_mandir}/man8/findfs.8*
%{_mandir}/man8/fsck.ext2.8*
%{_mandir}/man8/fsck.ext3.8*
164 165
%{_mandir}/man8/fsck.ext4.8*
%{_mandir}/man8/fsck.ext4dev.8*
Theodore Ts'o's avatar
Theodore Ts'o committed
166
%{_mandir}/man8/e2image.8*
167
%{_mandir}/man8/e2label.8*
168
%{_mandir}/man8/e2undo.8*
Theodore Ts'o's avatar
Theodore Ts'o committed
169
%{_mandir}/man8/fsck.8*
170
%{_mandir}/man8/logsave.8*
Theodore Ts'o's avatar
Theodore Ts'o committed
171
%{_mandir}/man8/mke2fs.8*
172 173
%{_mandir}/man8/mkfs.ext2.8*
%{_mandir}/man8/mkfs.ext3.8*
174 175
%{_mandir}/man8/mkfs.ext4.8*
%{_mandir}/man8/mkfs.ext4dev.8*
Theodore Ts'o's avatar
Theodore Ts'o committed
176 177 178
%{_mandir}/man8/mklost+found.8*
%{_mandir}/man8/resize2fs.8*
%{_mandir}/man8/tune2fs.8*
179
%{_mandir}/man8/filefrag.8*
Theodore Ts'o's avatar
Theodore Ts'o committed
180 181

%files devel
Theodore Ts'o's avatar
Theodore Ts'o committed
182
%defattr(-,root,root)
183
%{_infodir}/libext2fs.info*
184 185 186
%{_bindir}/compile_et
%{_bindir}/mk_cmds

187 188
%{_libdir}/libblkid.a
%{_libdir}/libblkid.so
189 190 191 192 193 194 195 196 197 198 199
%{_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

200 201 202 203 204 205 206
%{_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

207 208 209
%{_datadir}/et
%{_datadir}/ss
%{_includedir}/blkid
210
%{_includedir}/e2p
211 212 213 214
%{_includedir}/et
%{_includedir}/ext2fs
%{_includedir}/ss
%{_includedir}/uuid
Theodore Ts'o's avatar
Theodore Ts'o committed
215
%{_mandir}/man1/compile_et.1*
216
%{_mandir}/man1/mk_cmds.1*
Theodore Ts'o's avatar
Theodore Ts'o committed
217
%{_mandir}/man3/com_err.3*
218
%{_mandir}/man3/libblkid.3*
219
%{_mandir}/man3/uuid.3*
220 221 222 223 224 225 226 227 228 229 230
%{_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*

231 232 233 234 235 236 237 238
%files -n uuidd
%defattr(-,root,root)
# if you want to run via init
# /etc/init.d/uuidd
%{_mandir}/man8/uuidd.8*
%attr(6755, uuidd, uuidd) %{_sbindir}/uuidd
%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid