1 # Default to disabling device-mapper and SELinux
2 %define use_devmapper 0
6 # Enable device-mapper support if we find devmapper
7 %define use_devmapper %(pkg-config --libs devmapper >/dev/null 2>&1; [ $? -eq 0 ] && echo 1)
9 # Enable SELinux if we find libselinux and libsepol
10 %define use_selinux %([ -r %{_libdir}/libselinux.a ] && echo 1)
11 %define use_sepol %([ -r %{_libdir}/libsepol.so ] && echo 1)
13 Summary: The GNU disk partition manipulation program
17 Source: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.bz2
18 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
20 Group: Applications/System
22 BuildRequires: e2fsprogs-devel readline-devel ncurses-devel
23 BuildRequires: automake libtool gettext-devel texinfo pkgconfig
25 BuildRequires: device-mapper-devel, libselinux-devel libsepol-devel
27 Prereq: /sbin/install-info
30 The GNU Parted program allows you to create, destroy, resize, move,
31 and copy hard disk partitions. Parted can be used for creating space
32 for new operating systems, reorganizing disk usage, and copying data
36 Summary: Files for developing apps which will manipulate disk partitions
37 Group: Development/Libraries
38 Requires: %{name}-%{version}-%{release}
40 The GNU Parted library is a set of routines for hard disk partition
41 manipulation. If you want to develop programs that manipulate disk
42 partitions and filesystems using the routines provided by the GNU
43 Parted library, you need to install this package.
51 %if "%{use_devmapper}" == "1"
52 --enable-device-mapper \
56 %if "%{use_selinux}" == "1" && "%{use_sepol}" == "1"
61 --enable-part-static \
64 --disable-dynamic-loading
65 %{__make} %{?_smp_mflags}
68 %{__rm} -rf %{buildroot}
69 %{__make} install DESTDIR=%{buildroot}
72 %{__rm} -rf %{buildroot}
74 %post -p /sbin/ldconfig
76 %postun -p /sbin/ldconfig
79 %defattr(-,root,root,-)
80 %doc AUTHORS BUGS COPYING ChangeLog NEWS README THANKS TODO doc/API doc/FAT
83 %{_mandir}/man8/parted.8.gz
84 %{_mandir}/man8/partprobe.8.gz
85 %{_libdir}/libparted-*.so.*
86 %{_libdir}/libparted-*.so.*
87 %{_infodir}/parted.info.gz
90 %defattr(-,root,root,-)
92 %{_libdir}/libparted.a
93 %{_libdir}/libparted.so
94 %{_libdir}/pkgconfig/libparted.pc
97 * Tue Mar 13 2007 David Cantrell <dcantrell@redhat.com>
100 * Mon Mar 13 2000 Fabian Emmes <fab@orlen.de>
101 - changed "unset LINGUAS" line
102 - reintroduced %build section ;)