aca468e90399fcc25503091cc2f5e00fdb443c9b
[platform/upstream/e2fsprogs.git] / packaging / e2fsprogs.spec
1 Name:           e2fsprogs
2 BuildRequires:  autoconf
3 BuildRequires:  libblkid-devel
4 BuildRequires:  libuuid-devel
5 BuildRequires:  pkg-config
6 #BuildRequires:  -libmount1, -libuuid1, -libblkid1
7 Version:        1.42.4
8 Release:        0
9 Summary:        Utilities for the Second Extended File System
10 License:        GPL-2.0
11 Group:          System/Filesystems
12 Url:            http://e2fsprogs.sourceforge.net
13 Requires:       libcom_err >= %{version}
14 Requires:       libext2fs >= %{version}
15 Source:         http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v%{version}/e2fsprogs-%{version}.tar.xz
16 Source1:        baselibs.conf
17 Source2:        e2fsck.conf
18
19 %description
20 Utilities needed to create and maintain ext2 and ext3 file systems
21 under Linux. Included in this package are: chattr, lsattr, mke2fs,
22 mklost+found, tune2fs, e2fsck, resize2fs, and badblocks.
23
24 %package devel
25 Summary:        Dummy development package
26 License:        LGPL-2.0
27 Group:          Development/Libraries/C and C++
28 Requires:       libblkid-devel
29 Requires:       libext2fs-devel = %version
30 Requires:       libuuid-devel
31
32 %description devel
33 Dummy development package for backwards compatibility.
34
35 %package -n libext2fs
36 Summary:        Ext2fs library
37 License:        LGPL-2.0
38 Group:          System/Filesystems
39
40 %description -n libext2fs
41 The basic Ext2fs shared library.
42
43 %package -n libext2fs-devel
44 Summary:        Development files for libext2fs
45 License:        LGPL-2.0
46 Group:          Development/Libraries/C and C++
47 Requires:       libcom_err-devel
48 Requires:       libext2fs = %version
49
50 %description -n libext2fs-devel
51 Development files for libext2fs.
52
53 %package -n libcom_err
54 Summary:        E2fsprogs error reporting library
55 License:        MIT
56 Group:          System/Filesystems
57
58 %description -n libcom_err
59 com_err is an error message display library.
60
61 %package -n libcom_err-devel
62 Summary:        Development files for libcom_err
63 License:        MIT
64 Group:          Development/Libraries/C and C++
65 Requires:       glibc-devel
66 Requires:       libcom_err = %version
67
68 %description -n libcom_err-devel
69 Development files for the com_err error message display library.
70
71 %prep
72 %setup -q
73
74 %build
75 #autoreconf --force --install
76 %configure \
77   --disable-evms \
78   --with-root-prefix=''   \
79   --enable-elf-shlibs \
80   --disable-libblkid \
81   --disable-libuuid \
82   --disable-uuidd \
83   --disable-nls \
84   --disable-fsck \
85   CFLAGS="$RPM_OPT_FLAGS"
86 make %{?_smp_mflags} V=1
87
88 %install
89 make install install-libs DESTDIR=$RPM_BUILD_ROOT ELF_INSTALL_DIR=/%{_libdir}
90
91 # Let boot continue even if system clock is wrong
92 install -p -m 644 %{SOURCE2} %{buildroot}/etc/e2fsck.conf
93
94
95 rm $RPM_BUILD_ROOT%{_libdir}/e2initrd_helper
96 rm -f $RPM_BUILD_ROOT/%{_sbindir}/mkfs.ext4dev
97 rm -f $RPM_BUILD_ROOT/%{_sbindir}/fsck.ext4dev
98 rm -f $RPM_BUILD_ROOT/usr/share/man/man8/mkfs.ext4dev.8*
99 rm -f $RPM_BUILD_ROOT/usr/share/man/man8/fsck.ext4dev.8*
100 rm -v %{buildroot}%{_includedir}/quota/mkquota.h
101 rm -v %{buildroot}%{_libdir}/pkgconfig/quota.pc
102
103 # Need libext2fs.a for silo
104 find "%buildroot/%_libdir" -type f -name "*.a" \
105         -print -delete
106 %post
107 /sbin/ldconfig
108
109 %postun
110 /sbin/ldconfig
111
112 %post -n libext2fs -p /sbin/ldconfig
113
114 %postun -n libext2fs -p /sbin/ldconfig
115
116 %post -n libcom_err -p /sbin/ldconfig
117
118 %postun -n libcom_err -p /sbin/ldconfig
119
120 %docs_package
121
122 %files devel
123 %doc README
124
125 %files 
126 %defattr(-, root, root)
127 %doc RELEASE-NOTES README
128 %config /etc/e2fsck.conf
129 %config /etc/mke2fs.conf
130 %{_sbindir}/badblocks
131 %{_sbindir}/debugfs
132 %{_sbindir}/dumpe2fs
133 %{_sbindir}/e2undo
134 %{_sbindir}/e2fsck
135 %{_sbindir}/e2label
136 %{_sbindir}/fsck.ext2
137 %{_sbindir}/fsck.ext3
138 %{_sbindir}/fsck.ext4
139 %{_sbindir}/mke2fs
140 %{_sbindir}/mkfs.ext2
141 %{_sbindir}/mkfs.ext3
142 %{_sbindir}/mkfs.ext4
143 %{_sbindir}/resize2fs
144 %{_sbindir}/tune2fs
145 %{_sbindir}/e2image
146 %{_sbindir}/logsave 
147 %{_bindir}/chattr
148 %{_bindir}/lsattr
149 %{_sbindir}/mklost+found
150 %{_sbindir}/filefrag
151 %{_sbindir}/e2freefrag
152 %{_sbindir}/e4defrag
153
154 %files -n libext2fs
155 %defattr(-, root, root)
156 %{_libdir}/libext2fs.so.*
157 %{_libdir}/libe2p.so.*
158
159 %files -n libext2fs-devel
160 %defattr(-, root, root)
161 %{_libdir}/libext2fs.so
162 %{_libdir}/libe2p.so
163 /usr/include/ext2fs
164 /usr/include/e2p
165 %_libdir/pkgconfig/e2p.pc
166 %_libdir/pkgconfig/ext2fs.pc
167
168 %files -n libcom_err
169 %defattr(-, root, root)
170 %{_libdir}/libcom_err.so.*
171 %{_libdir}/libss.so.*
172
173 %files -n libcom_err-devel
174 %defattr(-, root, root)
175 %_bindir/compile_et
176 %_bindir/mk_cmds
177 %{_libdir}/libcom_err.so
178 %{_libdir}/libss.so
179 %_libdir/pkgconfig/com_err.pc
180 %_libdir/pkgconfig/ss.pc
181 %_includedir/com_err.h
182 %_includedir/et
183 %_includedir/ss
184 %_datadir/et
185 %_datadir/ss
186 %{_mandir}/man1/compile_et.1.gz
187 %{_mandir}/man1/mk_cmds.1.gz
188 %{_mandir}/man3/com_err.3.gz
189
190 %changelog