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
7 pkgdesc="OpenSCADA system is open implementation SCADA systems."
9 url="http://oscada.diyaorg.dp.ua/"
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')
19 _svntrunk=svn://oscada.org.ua/trunk/OpenSCADA
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
33 msg "Configure for global build ..."
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