updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / openscada-svn / PKGBUILD
blobcab9dcab32f6b9b28a182bf651638f7b97d076ac
1 # Shienkov Denis aka Kuzulis <scapig2@yandex.ru>
2 # This PKGBUILD is used to build the package Open Scada for OS ArchLinux. Currently supported assembly for i686 and x86_64
4 pkgname=openscada-svn
5 pkgver=1028
6 pkgrel=1
7 pkgdesc="OpenSCADA system is open implementation SCADA systems."
8 arch=('i686' 'x86_64')
9 url="http://oscada.diyaorg.dp.ua/"
10 license=('GPL')
11 depends=('gettext' 'gd' 'expat' 'mysql' 'sqlite3' 'openssl' 'bison' 'net-snmp' 'lm_sensors' 'portaudio' 'fftw' 'qt')
12 makedepends=('automoc4' 'automake' 'autoconf' 'libtool' 'make' 'gcc' 'gcc-libs' 'glibc' 'libgcrypt' 'subversion' 'pkgtools' 'pkgconfig')
13 provides=('openscada')
14 conflicts=('openscada')
16 source=()
17 md5sums=()
19 _svntrunk=svn://oscada.org.ua/trunk/OpenSCADA
20 _svnmod=OpenSCADA
22 build() {
23 cd "${srcdir}"
25 svn co $_svntrunk $_svnmod
27 msg "SVN checkout done or server timeout"
29 msg "Copy $_svnmod to $_svnmod-build"
30 cp -r $_svnmod $_svnmod-build
31 cd $_svnmod-build
33 msg "Configure for global build ..."
35 autoreconf -iv
36 ./configure             \
37   --prefix=/usr             \
38   --disable-FireBird
40 msg "Starting make..."
41 make VERBOSE=1 || return 1
42 make DESTDIR="${pkgdir}" install || return 1
44 msg "Copyng additional data and config files..."
45 install -m 777 -d "${pkgdir}"/var/spool/openscada/{DATA,icons,DEMO}
46 install -m 777 -d "${pkgdir}"/var/spool/openscada/ARCHIVES/{MESS,VAL}
47 install -m 644 -D data/oscada.xml "${pkgdir}"/etc/oscada.xml
48 install -m 644 -D data/oscada_start.xml "${pkgdir}"/etc/oscada_start.xml
49 install -m 755 -D data/openscada_start "${pkgdir}"/usr/bin/openscada_start
50 install -m 644 -D data/openscada.desktop "${pkgdir}"/usr/share/applications/openscada.desktop
51 install -m 644 -D data/openscada.png "${pkgdir}"/usr/share/icons/hicolor/64x64/apps/openscada.png
52 install -m 755 -D ../../oscadad "${pkgdir}"/etc/rc.d/oscadad
53 echo "OpenSCADA data dir" > "${pkgdir}"/var/spool/openscada/DATA/.info
54 install -m 644 data/icons/* "${pkgdir}"/var/spool/openscada/icons
55 echo "OpenSCADA messages archive dir" > "${pkgdir}"/var/spool/openscada/ARCHIVES/MESS/.info
56 echo "OpenSCADA values archive dir" > "${pkgdir}"/var/spool/openscada/ARCHIVES/VAL/.info
57 install -m 644 -D demo/oscada_demo.xml "${pkgdir}"/etc/oscada_demo.xml
58 install -m 755 -D demo/openscada_demo "${pkgdir}"/usr/bin/openscada_demo
59 install -m 644 -D demo/openscada_demo.desktop "${pkgdir}"/usr/share/applications/openscada_demo.desktop
60 install -m 644 -D demo/openscada_demo.png "${pkgdir}"/usr/share/icons/hicolor/64x64/apps/openscada_demo.png
61 install -m 644 demo/*.db "${pkgdir}"/var/spool/openscada/DEMO
63 msg "Remove $_svnmod-build..."
64 rm -rf ${srcdir}/$_svnmod-build