1 # Maintainer: SpepS <dreamspepser at yahoo dot it>
7 pkgdesc="The FAT16/FAT32 non-destructive resizer."
9 url="https://sourceforge.net/projects/fatresize/"
11 depends=('device-mapper')
12 source=("https://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2"
13 "http://ftp.gnu.org/gnu/parted/parted-$_parver.tar.xz")
14 md5sums=('3bfac57c0801d33ad39e740841e6441e'
15 'b6cc55fd6e04b37b1745bc2e10d1a888')
18 cd "$srcdir/parted-$_parver"
20 if [ ! -d lib$pkgname ]; then
22 # rename libparted to libfatresize
23 # for including in fatresize
24 msg "Renaming libparted to libfatresize ..."
25 sed -i "s/parted/$pkgname/gI" `grep -irl parted .`
26 for _line in `find . -depth -name "*parted*"`; do
27 mv $_line `echo $_line | sed "s/\(.*\)parted/\1$pkgname/"`
30 msg "Generating configure script ..."
32 ./configure --prefix=/usr \
37 # build libparted 2.4 as a shared
38 # lib for using it with fatresize
40 cd ../lib$pkgname && make
41 cp .libs/lib$pkgname.so.0.0.2 "$srcdir/$pkgname-$pkgver/lib$pkgname.so"
42 cp -a ../include "$srcdir/$pkgname-$pkgver"
47 cd "$srcdir/$pkgname-$pkgver"
49 # do not look for parted
50 sed -e "s|parted/parted.h||" \
51 -e "/dnl libparted/,+5d" \
54 # fix deprecated API and use libfatresize
55 sed -e "/PED_ASSERT/s/, return[^)]*//" \
56 -e "s/ped_free/free/" \
57 -e "s/parted/$pkgname/g" \
62 ./configure --prefix=/usr
63 make CFLAGS="-L. -l$pkgname -Iinclude"
67 cd "$srcdir/$pkgname-$pkgver"
69 make DESTDIR="$pkgdir/" install
72 install -Dm755 lib$pkgname.so "$pkgdir/usr/lib/lib$pkgname.so.0.0.2"
73 ln -s lib$pkgname.so.0.0.2 "$pkgdir/usr/lib/lib$pkgname.so"
74 ln -s lib$pkgname.so.0.0.2 "$pkgdir/usr/lib/lib$pkgname.so.0"
77 # vim:set ts=2 sw=2 et: