1 # Contributor: Jakub Schmidtke <sjakub-at-gmail.com>
6 pkgdesc="KosmosFS - distributed Filesystem"
8 url="http://kosmosfs.sourceforge.net"
10 depends=('log4cpp' 'boost' 'python2>=2.7')
11 makedepends=('cmake' 'jdk')
14 source=("http://downloads.sourceforge.net/project/kosmosfs/kosmosfs/kfs-${pkgver}/kfs-${pkgver}.tar.gz" "kfs-chunkserv.rc" "kfs-metaserv.rc" "kfs.confd" "kfs.conf" "kfswebui.conf")
15 # backup=('etc/conf.d/kfs' 'etc/kfs.conf' 'etc/kfswebui.conf')
18 rm -rf ${srcdir}/build
20 cd ${srcdir}/kfs-${pkgver} || return 1
21 # patch -Np1 -i ${srcdir}/hostname.patch || return 1
23 # sed -i 's@cmake_minimum_required(VERSION 2.4.6)@cmake_minimum_required(VERSION 2.4.6)\nSET(CMAKE_VERBOSE_MAKEFILE ON)@' CMakeLists.txt
25 sed -i 's|#include <map>|#include <map>\nextern "C" {\n#include <stdint.h>\n}|' src/cc/common/properties.h
26 sed -i 's|https://kosmosfs.svn.sourceforge.net/svnroot/kosmosfs/0.2.3|https://kosmosfs.svn.sourceforge.net/svnroot/kosmosfs/0.3|' src/cc/common/buildVers.py
28 echo "target_link_libraries(qcdio rt)" >> src/cc/qcdio/CMakeLists.txt
29 echo "target_link_libraries(qcdio-shared rt)" >> src/cc/qcdio/CMakeLists.txt
31 find -name \*.py -type f -exec sed -i 's|#!/usr/bin/env python$|#!/usr/bin/python2|' {} \;
32 find -name \*.py -type f -exec sed -i 's|#!/usr/bin/python$|#!/usr/bin/python2|' {} \;
33 sed -i 's|COMMAND python |COMMAND /usr/bin/python2 |' src/cc/common/CMakeLists.txt
35 mkdir -p ${srcdir}/build
38 cmake -Wno-dev -D CMAKE_BUILD_TYPE=Release ../kfs-${pkgver} || return 1
40 make install || return 1
42 mkdir -p ${pkgdir}/usr/bin
43 mkdir -p ${pkgdir}/usr/lib
44 mkdir -p ${pkgdir}/usr/include/kfs/common
45 mkdir -p ${pkgdir}/usr/share/kfs/bin/tests
46 mkdir -p ${pkgdir}/usr/share/kfs/bin/emulator
47 mkdir -p ${pkgdir}/usr/share/kfs/scripts
48 mkdir -p ${pkgdir}/usr/share/kfs/webui
50 install -m0755 bin/tests/* ${pkgdir}/usr/share/kfs/bin/tests/
53 install -m0755 bin/emulator/* ${pkgdir}/usr/share/kfs/bin/emulator/
56 install -m0755 bin/tools/* ${pkgdir}/usr/bin/
59 install -m0755 bin/* ${pkgdir}/usr/share/kfs/bin/
61 install -m0644 lib/static/* ${pkgdir}/usr/lib/
64 install -m0755 lib/* ${pkgdir}/usr/lib/
66 install -m0644 include/kfs/common/* ${pkgdir}/usr/include/kfs/common/
67 rm -rf include/kfs/common
69 install -m0644 include/kfs/* ${pkgdir}/usr/include/kfs/
71 install -m0755 ${srcdir}/kfs-${pkgver}/scripts/*.sh ${pkgdir}/usr/share/kfs/scripts/
73 install -D -m0755 ${srcdir}/kfs-chunkserv.rc ${pkgdir}/etc/rc.d/kfs-chunkserv
74 install -D -m0755 ${srcdir}/kfs-metaserv.rc ${pkgdir}/etc/rc.d/kfs-metaserv
75 install -D -m0644 ${srcdir}/kfs.confd ${pkgdir}/etc/conf.d/kfs.default
76 install -D -m0644 ${srcdir}/kfs.conf ${pkgdir}/etc/kfs.conf.default
77 install -D -m0644 ${srcdir}/kfswebui.conf ${pkgdir}/etc/kfswebui.conf.default
79 cp -a ${srcdir}/kfs-${pkgver}/webui/files ${pkgdir}/usr/share/kfs/webui/
81 install -D -m0755 ${srcdir}/kfs-${pkgver}/webui/kfsstatus.py ${pkgdir}/usr/share/kfs/webui/
84 md5sums=('ce0619f0811e9f30edeeeb663f68b028'
85 '5beed96cdc4ce543eab49c110ee6e383'
86 'cb7d402e865bc0f9498a7b837daca7d9'
87 '644ffa98afcb016cc2ec73ef5dc12cd0'
88 'aaacdbd30410f8ab3b264519b944e263'
89 'd99232fa0c729896f9ae9c213b4631ea')