1 # Contributor: Jakub Schmidtke <sjakub-at-gmail.com>
6 pkgdesc="KosmosFS - distributed Filesystem"
8 url="http://kosmosfs.sourceforge.net"
10 depends=('log4cpp' 'boost' 'python')
11 makedepends=('cmake' 'jdk' 'subversion')
15 source=("kfs-chunkserv.rc" "kfs-metaserv.rc" "kfs.confd" "kfs.conf" "kfswebui.conf")
16 # backup=('etc/conf.d/kfs' 'etc/kfs.conf' 'etc/kfswebui.conf')
18 _svntrunk=https://kosmosfs.svn.sourceforge.net/svnroot/kosmosfs/trunk
23 rm -rf ${srcdir}/build
25 if [ -d ${_svnmod} ]; then
26 msg "Updating SVN tree ..."
29 svn up -r ${pkgver} || return 1
30 msg "SVN update finished, starting build ..."
32 msg "Doing SVN checkout ..."
34 svn co ${_svntrunk} ${_svnmod} -r ${pkgver} || return 1
36 msg "SVN checkout finished, starting build ..."
39 cd ${srcdir}/${_svnmod}
41 ## patch -Np0 -i ${srcdir}/hostname.patch || return 1
42 # #patch -Np0 -i ${startdir}/tmp.patch || return 1
43 # patch -Np0 -i ${startdir}/types.patch || return 1
44 # patch -Np0 -i ${startdir}/tools.patch || return 1
46 # sed -i 's@cmake_minimum_required(VERSION 2.4.6)@cmake_minimum_required(VERSION 2.4.6)\nSET(CMAKE_VERBOSE_MAKEFILE ON)@' CMakeLists.txt
48 sed -i "s|'/home/.*/src/cc/'|'${srcdir}/${_svnmod}/src/cc/'|" src/cc/access/kfs_setup.py
49 sed -i "s|'/usr/.*boost.*/'|'/usr/include/boost/'|" src/cc/access/kfs_setup.py
51 mkdir -p ${srcdir}/build
54 cmake ../${_svnmod} || return 1
56 make install || return 1
58 mkdir -p ${pkgdir}/usr/bin
59 mkdir -p ${pkgdir}/usr/lib
60 mkdir -p ${pkgdir}/usr/include/kfs/common
61 mkdir -p ${pkgdir}/usr/share/${pkgname/-svn}/bin
62 mkdir -p ${pkgdir}/usr/share/${pkgname/-svn}/scripts
63 mkdir -p ${pkgdir}/usr/share/${pkgname/-svn}/webui
67 install -m0755 bin/tools/* ${pkgdir}/usr/bin/
70 install -m0755 bin/* ${pkgdir}/usr/share/${pkgname/-svn}/bin/
72 install -m0644 lib/static/* ${pkgdir}/usr/lib/
75 install -m0755 lib/* ${pkgdir}/usr/lib/
77 install -m0644 include/kfs/common/* ${pkgdir}/usr/include/kfs/common/
78 rm -rf include/kfs/common
79 install -m0644 include/kfs/* ${pkgdir}/usr/include/kfs/
81 install -m0755 ${srcdir}/${_svnmod}/scripts/*.sh ${pkgdir}/usr/share/${pkgname/-svn}/scripts/
83 install -D -m0755 ${srcdir}/kfs-chunkserv.rc ${pkgdir}/etc/rc.d/kfs-chunkserv
84 install -D -m0755 ${srcdir}/kfs-metaserv.rc ${pkgdir}/etc/rc.d/kfs-metaserv
85 install -D -m0644 ${srcdir}/kfs.confd ${pkgdir}/etc/conf.d/kfs.default
86 install -D -m0644 ${srcdir}/kfs.conf ${pkgdir}/etc/kfs.conf.default
87 install -D -m0644 ${srcdir}/kfswebui.conf ${pkgdir}/etc/kfswebui.conf.default
89 cp -a ${srcdir}/${_svnmod}/webui/files ${pkgdir}/usr/share/${pkgname/-svn}/webui/
90 install -D -m0755 ${srcdir}/${_svnmod}/webui/kfsstatus.py ${pkgdir}/usr/share/${pkgname/-svn}/webui/
92 ( cd ${srcdir}/kosmosfs/src/cc/access &&
93 python kfs_setup.py ${srcdir}/build/lib/ build &&
94 python kfs_setup.py ${srcdir}/build/lib/ install --prefix=/usr --root=${pkgdir} ) || return 1
96 md5sums=('5beed96cdc4ce543eab49c110ee6e383'
97 'cb7d402e865bc0f9498a7b837daca7d9'
98 '644ffa98afcb016cc2ec73ef5dc12cd0'
99 'aaacdbd30410f8ab3b264519b944e263'
100 'd99232fa0c729896f9ae9c213b4631ea')