3cee10f1f103cac63aa0cda83b240fcecf07196d
[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 Version:        1.43.4
7 Release:        0
8 Summary:        Utilities for the Second Extended File System
9 License:        GPL-2.0
10 Group:          System/Filesystems
11 Url:            http://e2fsprogs.sourceforge.net
12 Requires:       libcom_err >= %{version}
13 Requires:       libext2fs >= %{version}
14 Source:         http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v%{version}/e2fsprogs-%{version}.tar.xz
15 Source1:        baselibs.conf
16 Source2:        e2fsck.conf
17 Source1001:     e2fsprogs.manifest
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:          Base/Development
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:          Base/File Systems
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:          Base/Development
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:          Base/File Systems
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:          Base/Development
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 cp %{SOURCE1001} .
74
75 %build
76 %{?asan:%restore_fcommon}
77 %configure \
78   --disable-evms \
79   --with-root-prefix=''   \
80   --enable-elf-shlibs \
81   --disable-libblkid \
82   --disable-libuuid \
83   --disable-uuidd \
84   --disable-nls \
85   --disable-fsck \
86   CFLAGS="$RPM_OPT_FLAGS"
87 make %{?_smp_mflags} V=1
88
89 %install
90 make install install-libs DESTDIR=$RPM_BUILD_ROOT ELF_INSTALL_DIR=/%{_libdir}
91 find "%buildroot/%_libdir" -type f -name "*.a" \
92        -print -delete
93 # Let boot continue even if system clock is wrong
94 install -p -m 644 %{SOURCE2} %{buildroot}/etc/e2fsck.conf
95
96
97 rm $RPM_BUILD_ROOT%{_libdir}/e2initrd_helper
98 rm -f $RPM_BUILD_ROOT/%{_sbindir}/mkfs.ext4dev
99 rm -f $RPM_BUILD_ROOT/%{_sbindir}/fsck.ext4dev
100 rm -f $RPM_BUILD_ROOT/usr/share/man/man8/mkfs.ext4dev.8*
101 rm -f $RPM_BUILD_ROOT/usr/share/man/man8/fsck.ext4dev.8*
102
103 mkdir -p %{buildroot}/%{_defaultdocdir}/%{name}
104 install -p -m 644 README %{buildroot}/%{_defaultdocdir}/%{name}/README
105 install -p -m 644 RELEASE-NOTES %{buildroot}/%{_defaultdocdir}/%{name}/RELEASE-NOTES
106
107 %post -p /sbin/ldconfig
108
109 %postun -p /sbin/ldconfig
110
111 %post -n libext2fs -p /sbin/ldconfig
112
113 %postun -n libext2fs -p /sbin/ldconfig
114
115 %post -n libcom_err -p /sbin/ldconfig
116
117 %postun -n libcom_err -p /sbin/ldconfig
118
119 %docs_package
120 %doc %{_defaultdocdir}/%{name}/RELEASE-NOTES
121 %doc %{_defaultdocdir}/%{name}/README
122
123 %files devel
124 %manifest %{name}.manifest
125 %doc README
126
127 %files
128 %manifest %{name}.manifest
129 %defattr(-, root, root)
130 %license NOTICE
131 %config /etc/e2fsck.conf
132 %config /etc/mke2fs.conf
133 %{_sbindir}/badblocks
134 %{_sbindir}/debugfs
135 %{_sbindir}/dumpe2fs
136 %{_sbindir}/e2undo
137 %{_sbindir}/e2fsck
138 %{_sbindir}/e2label
139 %{_sbindir}/fsck.ext2
140 %{_sbindir}/fsck.ext3
141 %{_sbindir}/fsck.ext4
142 %{_sbindir}/mke2fs
143 %{_sbindir}/mkfs.ext2
144 %{_sbindir}/mkfs.ext3
145 %{_sbindir}/mkfs.ext4
146 %{_sbindir}/resize2fs
147 %{_sbindir}/tune2fs
148 %{_sbindir}/e2image
149 %{_sbindir}/logsave
150 %{_bindir}/chattr
151 %{_bindir}/lsattr
152 %{_sbindir}/mklost+found
153 %{_sbindir}/filefrag
154 %{_sbindir}/e2freefrag
155 %{_sbindir}/e4crypt
156 %{_sbindir}/e4defrag
157
158 %files -n libext2fs
159 %manifest %{name}.manifest
160 %defattr(-, root, root)
161 %license NOTICE
162 %{_libdir}/libext2fs.so.*
163 %{_libdir}/libe2p.so.*
164
165 %files -n libext2fs-devel
166 %manifest %{name}.manifest
167 %defattr(-, root, root)
168 %{_libdir}/libext2fs.so
169 %{_libdir}/libe2p.so
170 /usr/include/ext2fs
171 /usr/include/e2p
172 %_libdir/pkgconfig/e2p.pc
173 %_libdir/pkgconfig/ext2fs.pc
174
175 %files -n libcom_err
176 %manifest %{name}.manifest
177 %defattr(-, root, root)
178 %license debian/copyright
179 %{_libdir}/libcom_err.so.*
180 %{_libdir}/libss.so.*
181
182 %files -n libcom_err-devel
183 %manifest %{name}.manifest
184 %defattr(-, root, root)
185 %_bindir/compile_et
186 %_bindir/mk_cmds
187 %{_libdir}/libcom_err.so
188 %{_libdir}/libss.so
189 %_libdir/pkgconfig/com_err.pc
190 %_libdir/pkgconfig/ss.pc
191 %_includedir/com_err.h
192 %_includedir/et
193 %_includedir/ss
194 %_datadir/et
195 %_datadir/ss
196
197 %changelog