summaryrefslogtreecommitdiff
path: root/community/icecast/PKGBUILD
blob: cf2130e4e9c8763848dfb5dd37b3a3071193ecb9 (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
# $Id: PKGBUILD 72696 2012-06-20 10:14:35Z lfleischer $
# Maintainer:
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Jason Chu <jchu@xentac.net>

pkgname=icecast
pkgver=2.3.3
pkgrel=1
pkgdesc='Streaming audio over the Internet'
arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
url='http://www.icecast.org/'
depends=('libxslt' 'libvorbis' 'curl' 'speex' 'libtheora')
backup=('etc/icecast.xml'
        'etc/logrotate.d/icecast')
source=("http://downloads.us.xiph.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz"
        'icecastd'
        'icecast.logrotate'
        'start-by-nobody.patch')
md5sums=('2b5d1b40778922e5f6431b7758c359ad'
         'e823c1fdb080aae3d0c54ef8be95f7cb'
         '59c6552bcb1dd9fb542af8670dfabd3c'
         'd8e929d2214123a1954da4383bf16583')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  patch -Np1 -i "${srcdir}/start-by-nobody.patch"

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}" install

  # install man page
  sed -i -e 's/icecast2/icecast/g' debian/icecast2.1
  install -Dm644 debian/icecast2.1 "${pkgdir}/usr/share/man/man1/icecast.1"

  # install rc.d script and logrotate config (taken from Fedora)
  install -Dm755 "${srcdir}/icecastd" "${pkgdir}/etc/rc.d/icecast"
  install -Dm644 "${srcdir}/icecast.logrotate" "${pkgdir}/etc/logrotate.d/icecast"

  # create log directory
  install -d -g99 -o99 "${pkgdir}/var/log/icecast"
}