parted-3.2.recipe revision ae94b127
1SUMMARY="The GNU partition editor"
2DESCRIPTION="GNU Parted manipulates partition tables. This is useful for \
3creating space for new operating systems, reorganizing disk usage, copying \
4data on hard disks and disk imaging."
5HOMEPAGE="https://www.gnu.org/software/parted/"
6COPYRIGHT="1999-2014 Free Software Foundation Inc."
7LICENSE="GNU GPL v3"
8REVISION="6"
9SOURCE_URI="https://ftpmirror.gnu.org/parted/parted-$portVersion.tar.xz
10	https://ftp.gnu.org/gnu/parted/parted-$portVersion.tar.xz"
11CHECKSUM_SHA256="858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4"
12PATCHES="parted-$portVersion.patchset"
13
14ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
15SECONDARY_ARCHITECTURES="?x86"
16
17# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
18commandSuffix=$secondaryArchSuffix
19commandBinDir=$binDir
20if [ "$targetArchitecture" = x86_gcc2 ]; then
21	commandSuffix=
22	commandBinDir=$prefix/bin
23fi
24
25libVersion="2.0.1"
26libFsResizeVersion="0.0.1"
27
28libMajorVersion="${libVersion%%.*}"
29libFsResizeMajorVersion="${libFsResizeVersion%%.*}"
30
31libVersionCompat="$libVersion compat >= $libMajorVersion"
32libFsResizeVersionCompat="$libFsResizeVersion compat >= $libFsResizeMajorVersion"
33
34PROVIDES="
35	parted$secondaryArchSuffix = $portVersion
36	cmd:parted$commandSuffix = $portVersion
37	cmd:partprobe$commandSuffix = $portVersion
38	lib:libparted$secondaryArchSuffix = $libVersionCompat
39	lib:libparted_fs_resize$secondaryArchSuffix = $libFsResizeVersionCompat
40	"
41REQUIRES="
42	haiku$secondaryArchSuffix
43	lib:libblkid$secondaryArchSuffix
44	lib:libiconv$secondaryArchSuffix
45	lib:libintl$secondaryArchSuffix
46	lib:libncurses$secondaryArchSuffix
47	lib:libreadline$secondaryArchSuffix
48	lib:libuuid$secondaryArchSuffix >= 1.3
49	"
50
51PROVIDES_devel="
52	parted${secondaryArchSuffix}_devel = $portVersion
53	devel:libparted$secondaryArchSuffix = $libVersionCompat
54	devel:libparted_fs_resize$secondaryArchSuffix = $libFsResizeVersionCompat
55	"
56REQUIRES_devel="
57	parted$secondaryArchSuffix == $portVersion base
58	devel:libblkid$secondaryArchSuffix
59	devel:libiconv$secondaryArchSuffix
60	devel:libintl$secondaryArchSuffix
61	devel:libncurses$secondaryArchSuffix
62	devel:libreadline$secondaryArchSuffix
63	devel:libuuid$secondaryArchSuffix >= 1.3
64	"
65
66BUILD_REQUIRES="
67	haiku${secondaryArchSuffix}_devel
68	devel:libblkid$secondaryArchSuffix
69	devel:libiconv$secondaryArchSuffix
70	devel:libintl$secondaryArchSuffix
71	devel:libncurses$secondaryArchSuffix
72	devel:libreadline$secondaryArchSuffix
73	devel:libuuid$secondaryArchSuffix >= 1.3
74	"
75BUILD_PREREQUIRES="
76	cmd:aclocal
77	cmd:autoconf
78	cmd:autom4te
79	cmd:automake
80	cmd:autoreconf
81	cmd:awk
82	cmd:gcc$secondaryArchSuffix
83	cmd:gettext$secondaryArchSuffix
84	cmd:gperf
85	cmd:grep
86	cmd:iconv
87	cmd:ld$secondaryArchSuffix
88	cmd:libtoolize$secondaryArchSuffix
89	cmd:make
90	cmd:pkg_config$secondaryArchSuffix
91	cmd:sed
92	"
93
94TEST_REQUIRES="
95	cmd:dd
96	"
97
98defineDebugInfoPackage parted$secondaryArchSuffix \
99	"$libDir"/libparted.so.$libVersion \
100	"$libDir"/libparted-fs-resize.so.$libFsResizeVersion
101
102BUILD()
103{
104	autoreconf
105	CPPFLAGS="-Wimplicit-fallthrough=0" \
106	MAKEINFO=true \
107	runConfigure --omit-dirs sbinDir ./configure --sbindir=$commandBinDir \
108		--disable-device-mapper
109	make $jobArgs
110}
111
112INSTALL()
113{
114	make install
115
116	rm -f "$libDir"/libparted*.la
117
118	prepareInstalledDevelLibs \
119		libparted \
120		libparted-fs-resize
121
122	fixPkgconfig
123
124	# devel package
125	packageEntries devel \
126		$developDir
127}
128
129TEST()
130{
131	make check
132}
133