You are not logged in.

#1 2013-05-06 08:30:36

januslian
Member
Registered: 2013-05-06
Posts: 2

[solved]make error when using svn in PKGBUILD

Hi, all

I want to install the development package of R software using PKGBUILD. My PKGBUILD file is like this:

pkgname=r
_svnmod=r
pkgver=0.0.0
pkgrel=1
pkgdesc="R is a language and environment for statistical computing and graphics"
arch=('i686' 'x86_64')
license=('GPL')
url=('http://www.r-project.org/')
depends=('blas' 'lapack' 'bzip2'  'libpng' 'libjpeg' 'libtiff'
         'ncurses' 'pcre' 'readline' 'zlib' 'perl' 'gcc-libs'
         'tk' 'libxt' 'libxmu' 'pango')
#makedepends=('subversion' 'openjdk6' 'gcc-fortran')
makedepends=('subversion' 'jre7-openjdk')
options=('!makeflags')
conflicts=('r')
provides=('r')

source=('r::svn+https://svn.r-project.org/R/trunk/')
md5sums=('SKIP')

pkgver() {
	cd "$SRCDEST/$_svnmod"
	svnversion
}

build() {
   cd "$srcdir/$_svnmod" 
    
   ./configure  --prefix=/usr \
 		 --libdir=/usr/lib \
 		 --datarootdir=/usr/share \
		 rsharedir=/usr/share/R/ \
		 rincludedir=/usr/include/R/ \
		 rdocdir=/usr/share/R/docs/ \
		 --enable-memory-profiling \
		 --with-readline \
		 --with-x \
		 --with-system-zlib \
		 --with-system-bzlib  \
		 --with-system-pcre \
		 --enable-R-shlib \
		 --with-lapack \
		 --with-blas \
		 --without-recommended-packages \
		 F77=gfortran \
		 LIBnn=lib

	 make
}

package() {
	cd "$srcdir/$_svnmod"
	make -j1 DESTDIR=${pkgdir} install
	#  Fixup R wrapper scripts.
	sed -i "s|${pkgdir} ||" ${pkgdir}/usr/bin/R
	rm ${pkgdir}/usr/lib/R/bin/R
	cd ${pkgdir}/usr/lib/R/bin
	ln -s ../../../bin/R
}

But i encounter a make error like this:

ERROR: not an svn checkout
make: *** [svnonly] ERROR 1

Did anyone give me some advices? Thanks a lot!

PS. I was noticed that in wiki page "VCS PKGBUILD Guidelines", "The copy in $srcdir is made using svn export which does not create working copies. Any svn related command has to be used in the local repo in $SRCDEST." So when I change the cd line in build() and package() function into

cd "$SRCDEST/$_svnmod"

,
the error message vanished. But the local repo are changed when configure and make the project.

Last edited by januslian (2013-05-06 08:50:09)

Offline

#2 2013-05-06 08:45:25

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 5,090

Re: [solved]make error when using svn in PKGBUILD

This will be fixed in pacman 4.1.1. For now, just copy the ".svn" dir yourself. cp -r "$SRCDEST/$_svnmod/.svn" "$srcdir/$_svnmod"

Offline

#3 2013-05-06 08:49:46

januslian
Member
Registered: 2013-05-06
Posts: 2

Re: [solved]make error when using svn in PKGBUILD

Scimmia wrote:

This will be fixed in pacman 4.1.1. For now, just copy the ".svn" dir yourself. cp -r "$SRCDEST/$_svnmod/.svn" "$srcdir/$_svnmod"

Great, it works. Thanks.

Offline

Board footer

Powered by FluxBB