summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ecbf7f7ed5a3a828c02fc7f47e8e05c5c7531381 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#Maintainer: dreieck
#Contributor: Gaetan Bisson <bisson@archlinux.org>
#Contributor: Tobias Powalowski <tpowa@archlinux.org>

_pkgname=unison
_pkgver=2.48.4
_debianver="-1+b1"
pkgname="${_pkgname}-${_pkgver}-compat-bin"
pkgver="${_pkgver}"
pkgrel=2
pkgdesc='File-synchronization tool. Specific version ${_pkgver}, compatible with parallel installation to other versions of unison binaries (but pay attention to the local user configurations!). Prebuilt binary from debian, repackaged.'
url='http://www.cis.upenn.edu/~bcpierce/unison/'
arch=(
  'x86_64'
)
license=('GPL2')
depends=(
  'glibc'
)
optdepends=(
  "${_pkgname}-gtk=${pkgver}: For gtk2 GUI support."
)
provides=(
  "${_pkgname}-${_pkgver}=${pkgver}"
  "${_pkgname}-${_pkgver%.*}=${pkgver}"
  "${_pkgname}-${_pkgver}-compat=${pkgver}"
  "${_pkgname}-${_pkgver%.*}-compat=${pkgver}"
  "${_pkgname}-doc=${pkgver}"
)
conflicts=(
  "${_pkgname}-${pkgver%.*}"
)
source=(
  "http://ftp.de.debian.org/debian/pool/main/u/${_pkgname}/${_pkgname}_${_pkgver}${_debianver}_amd64.deb"
  "https://www.cis.upenn.edu/~bcpierce/unison/download/releases/${_pkgname}-${_pkgver}/unison-${_pkgver}-manual.pdf"
  "https://www.cis.upenn.edu/~bcpierce/unison/download/releases/${_pkgname}-${_pkgver}/unison-${_pkgver}-manual.html"
)
sha256sums=(
  '3486bca59be0d6c72c83e5be0ef9b11c5f0e5c82e9a88db3ce6f675760b6a8fe'
  'eaf9bf89967eb17c59b98f0a7ba6b6ff260b6c6de73277a633d954ceb42f5f93'
  '2b5674e2fd7751148784a716ce5a03f8cd0a321c8a3bd4343832ed9b83d2d404'
)

prepare() {
  _content="data.tar.xz"
  mkdir -p "${srcdir}/content"
  cd "${srcdir}/content"
  msg2 "Extracting ${_content} ..."
  bsdtar xf "${srcdir}/${_content}"
}

package() {
    cd "${srcdir}/content"

    cp -a "${srcdir}/content"/* "${pkgdir}"/

    rm -R "${pkgdir}/usr/bin/unison-latest-stable"
    rm -R "${pkgdir}/usr/share/doc-base"
    rm -R "${pkgdir}/usr/share/man/man1/unison-latest-stable.1.gz"

    for _docfile in "unison-${_pkgver}-manual".{html,pdf}; do
      install -D -m644 "${srcdir}/${_docfile}" "${pkgdir}/usr/share/doc/${_pkgname}/${_docfile}"
    done
}