OCaml 4.14.0 rebuild
[arch-packages.git] / p7zip / trunk / PKGBUILD
blob226855481dccd687107fe2503c636882ffc6425a
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.04
10 pkgrel=3
11 epoch=1
12 pkgdesc="Command-line file archiver with high compression ratio"
13 arch=('x86_64')
14 url="https://github.com/jinfeihan57/p7zip"
15 license=('LGPL' 'custom:unRAR')
16 depends=('gcc-libs' 'sh')
17 source=(https://github.com/jinfeihan57/p7zip/archive/v$pkgver/$pkgname-v$pkgver.tar.gz
18         oemcp-iconv.patch::https://github.com/jinfeihan57/p7zip/commit/c104127e6a93.patch
19         oemcp-cygwin.patch::https://github.com/jinfeihan57/p7zip/commit/0e0a1a8316b6.patch
20         oemcp-apple.patch::https://github.com/jinfeihan57/p7zip/commit/334a01e3f8bc.patch
21         do-not-gzip-man-pages.patch)
22 sha256sums=('ea029a2e21d2d6ad0a156f6679bd66836204aa78148a4c5e498fe682e77127ef'
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/jinfeihan57/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: