summaryrefslogtreecommitdiff
path: root/libre/unzip/PKGBUILD
blob: e65d23aaf768c1cc20dc9741126c97d72c751c55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# $Id: PKGBUILD 215748 2014-06-30 11:29:59Z bisson $
# Maintainer (Arch):
# Contributor (Arch): Douglas Soares de Andrade <douglas@archlinux.org>
# Contributor (Arch): Robson Peixoto

_pkgname=unzip-libre
pkgname=unzip
pkgver=6.0
_pkgver=${pkgver/./}
pkgrel=7.parabola1
pkgdesc='For extracting and viewing files in .zip archives'
url='http://www.info-zip.org/UnZip.html'
arch=('i686' 'x86_64' 'mips64el')
license=('custom')
depends=('bzip2' 'bash')
conflicts=("${_pkgname}")
replaces=("${_pkgname}")
mksource=("http://downloads.sourceforge.net/infozip/${pkgname}${_pkgver}.tar.gz"
          'match.patch')
source=("https://repo.parabola.nu/other/${_pkgname}/${pkgname}${_pkgver}-libre.tar.gz")
mkmd5sums=('62b490407489521db863b523a7f86375'
           'e6d9f0c204c2abe6a57dc5e1637d5140')
md5sums=('bbe4b7f4d48b2f939b5e43fde0ac7762')

mksource() {
	cd "${srcdir}/${pkgname}${_pkgver}"

	# from http://bzr.trisquel.info/package-helpers/trunk/annotate/head%3A/helpers/natty/DATA/unzip/match.patch
	patch -Np0 -i ${srcdir}/match.patch
}

build() {
	cd "${srcdir}/${pkgname}${_pkgver}"

	# DEFINES, make, and install args from Debian
	DEFINES='-DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR -DLARGE_FILE_SUPPORT \
		-DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DNO_LCHMOD \
		-DDATE_FORMAT=DF_YMD -DUSE_BZIP2 -DNOMEMCPY -DNO_WORKING_ISPRINT'

	make -f unix/Makefile prefix=/usr \
		D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2 \
		LF2="$LDFLAGS" CF="$CFLAGS $CPPFLAGS -I. $DEFINES" \
		unzips
}

package(){
	cd "${srcdir}/${pkgname}${_pkgver}"
	make -f unix/Makefile prefix="${pkgdir}"/usr install
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}