aboutsummaryrefslogtreecommitdiff
path: root/network/silc/silc.build
blob: 47e474f03ace81ccde6e0cf56146a97073e7b2b2 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash

source /usr/src/ports/Build/build.sh

PACKAGER="Witukind <witukind@nsbm.kicks-ass.org>"
ARCH=i586
BUILD=1

# Sources
SRCNAME[0]=silc-toolkit
SRCVER[0]=1.1.3
SRCREP[0]=http://silcnet.org/download/toolkit/sources
SRCPKG[0]=${SRCNAME[0]}-${SRCVER[0]}.tar.bz2
SRCROOT[0]=${SRCNAME[0]}-${SRCVER[0]}

# Packages
PKGNAME[0]=libsilc
PKGVER[0]=${SRCVER[0]}
PKGARCH[0]=${ARCH}

PKGNAME[1]=${PKGNAME[0]}_dev
PKGVER[1]=${SRCVER[0]}
PKGARCH[1]=${ARCH}
PKGOPTS[1]="nodocdir"

PKGNAME[2]=${PKGNAME[0]}_doc
PKGVER[2]=${SRCVER[0]}
PKGARCH[2]=${ARCH}
PKGOPTS[2]="nodocdir"

begin

(
  cd ${SRC[0]}
  CFLAGS=$DISTFLAGS CXXFLAGS=$DISTFLAGS \
  ./configure \
  --enable-static=no \
  --enable-shared=yes \
  --prefix=/usr \
  --sysconfdir=/etc \
  --mandir=/usr/man \
  --docdir=/srv/www/doc/silc \
  --includedir=/usr/include/silc \
  --with-simdir=/usr/libexec/silc \
  --enable-ipv6 \
  --with-gmp=/usr \
  $ARCH-pc-linux-gnu
  make
  make install DESTDIR=${PKG[0]}

  mkdir -p \
   ${PKG[1]}/usr/{lib,doc/${PKGNAME[0]}-${PKGVER[0]}} \
   ${PKG[2]}/srv/www/doc

  mv \
   ${PKG[0]}/srv/www/doc/silc/*.txt \
   ${PKG[1]}/usr/doc/${PKGNAME[0]}-${PKGVER[0]}

  mv \
   ${PKG[0]}/srv/www/doc/silc/tutorial/mybot \
   ${PKG[1]}/usr/doc/${PKGNAME[0]}-${PKGVER[0]}/tutorial

  mv \
   ${PKG[0]}/srv/www/doc/silc/CHANGES \
   ${PKG[0]}/srv/www/doc/silc/CREDITS \
   ${PKG[0]}/srv/www/doc/silc/FAQ \
   ${PKG[0]}/srv/www/doc/silc/README \
   ${PKG[0]}/srv/www/doc/silc/TODO \
   ${PKG[0]}/usr/doc/${PKGNAME[0]}-${PKGVER[0]}

  mv \
   ${PKG[0]}/srv/www/doc/silc/toolkit \
   ${PKG[2]}/srv/www/doc/silc

  mv \
   ${PKG[0]}/usr/include \
   ${PKG[1]}/usr

  mv \
   ${PKG[0]}/usr/lib/pkgconfig \
   ${PKG[1]}/usr/lib

  rm -rf \
   ${PKG[0]}/srv

  chmod 0755 ${PKG[0]}/usr/libexec/silc/*.so*
)

end