summaryrefslogtreecommitdiff
path: root/libre/abs-libre/PKGBUILD
blob: 259cf007fed5730c2b28e03b00658544fac8bb9c (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
# $Id: PKGBUILD 166402 2012-09-07 16:49:13Z dreisner $
# Maintainer: Allan McRae <allan@archlinux.org>

_pkgname=abs
pkgname=abs-libre
#CARCH=mips64el
pkgver=2.4.4
pkgrel=1
pkgdesc="Utilities to download and work with the Arch Build System (ABS)"
arch=('i686' 'x86_64' 'mips64el')
url="http://projects.archlinux.org/abs.git/"
license=('GPL')
depends=('bash' 'rsync')
backup=(etc/abs.conf)
source=(ftp://ftp.archlinux.org/other/abs/${pkgname}-${pkgver}.tar.gz{,.sig})
md5sums=('7258c739a93e02a4f31f114e9fc3b0ba'
         'a628f7d5b1cd1e838366b88709690c24')
provides=("${_pkgname}=${pkgver}")
replaces=("${_pkgname}")
conflicts=("${_pkgname}")

build() {
  cd "$_pkgname-$pkgver"

  make
}

package() {
  cd "$_pkgname-$pkgver"

  make DESTDIR="${pkgdir}" install

  # Add readme file, and make base /var/abs path
  install -dm755 "${pkgdir}"/var/abs/local/
  install -Dm644 README "${pkgdir}"/var/abs/README

  sed -i -e 's|rsync.archlinux.org|parabolagnulinux.org|' ${pkgdir}/etc/abs.conf
  sed -i -e 's|(core|(libre !libre-testing core|' ${pkgdir}/etc/abs.conf

  # make adjustments to abs.conf
  if [[ $CARCH = "i686" ]]; then
    sed -i -e 's| multilib||' -e 's| !multilib-testing||' "${pkgdir}"/etc/abs.conf
  fi
  if [[ $CARCH = "x86_64" ]]; then
    sed -i '/ARCH=/s|i686|x86_64|' "${pkgdir}"/etc/abs.conf
  fi
  if [[ $CARCH = "mips64el" ]]; then
        sed -i -e 's| multilib||' -e 's| !multilib-testing||' ${pkgdir}/etc/abs.conf
        sed -i '/ARCH=/s|i686|mips64el|' ${pkgdir}/etc/abs.conf
  fi
}