summaryrefslogtreecommitdiff
path: root/community/nut/PKGBUILD
blob: d08ffc87d9f6565f4dfba323dc364afea73481eb (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
# Maintainer: Thomas Dziedzic < gostrc at gmail >
# Contributor: Slash <demodevil5 [at] yahoo [dot] com>

pkgname=nut
pkgver=17.4
pkgrel=1
pkgdesc='Records what you eat and analyzes your meals for nutrient levels in terms of the Daily Value or DV which is the standard for food labeling in the US.'
url='http://nut.sourceforge.net/'
license=('GPL')
arch=('i686' 'x86_64' 'mips64el')
source=("http://downloads.sourceforge.net/project/nut/nut/${pkgver}/nut-${pkgver}.tar.gz")
md5sums=('9d8b33fe0edbc54a6ebc8050dec7d56b')

build() {
  cd ${pkgname}-${pkgver}

  # change install path to /usr instead of /usr/local
  sed \
    -e 's#/local##' \
    -i Makefile

  make
}

package() {
  cd ${pkgname}-${pkgver}

  # Install Data
  install -d ${pkgdir}/usr/lib/${pkgname}
  install -m644 raw.data/* \
    ${pkgdir}/usr/lib/${pkgname}/

  # Install Binary
  install -D ${pkgname} \
    ${pkgdir}/usr/bin/${pkgname}

  # Install Man Page
  install -D -m644 ${pkgname}.1 \
    ${pkgdir}/usr/share/man/man1/${pkgname}.1
}