You are not logged in.

#1 2013-04-26 18:41:41

nickray
Member
From: Switzerland
Registered: 2012-04-02
Posts: 8

PKGBUILD for Shark with CMake

I'm trying to make a basic PKGBUILD for Shark: http://image.diku.dk/shark

pkgname=libshark-svn
pkgver=3.0beta
pkgrel=1
pkgdesc="SHARK is a fast, modular, feature-rich open-source C++ machine learning library."
arch=('x86_64')
url="http://http://image.diku.dk/shark"
license=('GPL2')
groups=()
depends=('boost-libs')
makedepends=('boost' 'subversion')
changelog=
source=('libshark-svn::svn+https://svn.code.sf.net/p/shark-project/code/trunk/Shark')
sha256sums=('SKIP')
sha512sums=('SKIP')
md5sums=('SKIP')

build() {
  cd $pkgname
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT=/usr -DBOOST_INCLUDEDIR=/usr/include -DBOOST_LIBRARYDIR=/usr/lib -DBoost_DEBUG=True -DOPT_DYNAMIC_LIBRARY=TRUE -DCMAKE_BUILD_TYPE=Release .
  make
}

package() {
  make -C $pkgname install
}

It's not perfect according to package guidelines -- I know, will be fixed.
But my main problem is that the install step fails:

Install the project...
-- Install configuration: "Release"
CMake Error at cmake_install.cmake:36 (FILE):
  file cannot create directory: /usr/lib/CMake/Shark.  Maybe need
  administrative privileges.

Any ideas? As far as I understand, makepkg should chroot everything nicely so that the make install is redirected to the pkg/ subdirectory, no? Which definitely does not need root.


dd if=archlinux-XXX.iso of=/dev/sdX

Offline

#2 2013-04-26 18:53:39

nickray
Member
From: Switzerland
Registered: 2012-04-02
Posts: 8

Re: PKGBUILD for Shark with CMake

It seems that CMake creates a "make package" target with which I should be able to hack around this issue. But I'm still curious.


dd if=archlinux-XXX.iso of=/dev/sdX

Offline

#3 2013-04-26 19:00:54

Raynman
Member
Registered: 2011-10-22
Posts: 1,093

Re: PKGBUILD for Shark with CMake

Offline

Board footer

Powered by FluxBB