archrelease: copy trunk to extra-x86_64
[arch-packages.git] / p7zip / trunk / PKGBUILD
blob63688b559eae304c0d52c12bb4b30ef112eb44c3
1 # Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
2 # Contributor: Gaetan Bisson <bisson@archlinux.org>
3 # Contributor: Thayer Williams <thayer@archlinux.org>
4 # Contributor: Hugo Doria <hugo@archlinux.org>
5 # Contributor: TuxSpirit<tuxspirit@archlinux.fr>
6 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
8 pkgname=p7zip
9 pkgver=17.05
10 pkgrel=1
11 epoch=1
12 pkgdesc="Command-line file archiver with high compression ratio"
13 arch=('x86_64')
14 url="https://github.com/p7zip-project/p7zip"
15 license=('LGPL' 'custom:unRAR')
16 depends=('gcc-libs' 'sh')
17 source=(https://github.com/p7zip-project/p7zip/archive/v$pkgver/$pkgname-v$pkgver.tar.gz
18         oemcp-iconv.patch::https://github.com/p7zip-project/p7zip/commit/c104127e6a93.patch
19         oemcp-cygwin.patch::https://github.com/p7zip-project/p7zip/commit/0e0a1a8316b6.patch
20         oemcp-apple.patch::https://github.com/p7zip-project/p7zip/commit/334a01e3f8bc.patch
21         do-not-gzip-man-pages.patch)
22 sha256sums=('9473e324de6a87d89cb7ff65b0fec4ae3f147f03ffc138189c336a4650d74804'
23             '50f2068124c1c6adc2d9ccf455e9816eccd39d31920b953ab8fcb853232d452c'
24             '789789216ca46e5ea9b6780e353f964a1f46e9a2bcaa6b16413adcf9a89eb374'
25             'dfe1a625f80078c3ec68038f0aae8ba3a82ea96d0aeb97cb3586dc7fb3ef9650'
26             '2179e67764eb46cb414ce9b5c978a532a6499617a6a685deb323b6da122aba00')
28 prepare() {
29   cd $pkgname-$pkgver
31   # Leave man page compression to makepkg to maintain reproducibility
32   patch -Np1 -i ../do-not-gzip-man-pages.patch
34   # https://github.com/p7zip-project/p7zip/issues/112
35   patch -Rp1 -i ../oemcp-apple.patch
36   patch -Rp1 -i ../oemcp-cygwin.patch
37   patch -Rp1 -i ../oemcp-iconv.patch
40 build() {
41   cd $pkgname-$pkgver
42   make OPTFLAGS="$CPPFLAGS $CFLAGS" 7z 7zr 7za
45 package() {
46   cd $pkgname-$pkgver
48   make install \
49     DEST_DIR="$pkgdir" \
50     DEST_HOME=/usr \
51     DEST_MAN=/usr/share/man
53   # Remove documentation for the GUI file manager
54   rm -r "$pkgdir/usr/share/doc/p7zip/DOC/MANUAL/fm"
56   install -d "${pkgdir}"/usr/share/licenses/p7zip
57   ln -s -t "$pkgdir/usr/share/licenses/p7zip/" \
58     /usr/share/doc/p7zip/DOC/License.txt \
59     /usr/share/doc/p7zip/DOC/unRarLicense.txt
62 # vim:set ts=2 sw=2 et: