You are not logged in.

#1 2012-03-06 08:36:32

PerisH
Member
Registered: 2010-02-24
Posts: 24

Creating a package for Slic3r

Hi! I need to create and install a package named Slic3r. I create a PKGBUILD to install it from git, but there are something wrong. The package seems to have a wrong url to the repository on git-hub.

¿Can anybody help me?

PKGBUILD:

pkgname=Slic3r-Git
pkgver=20120306
pkgrel=1
pkgdesc=""
arch=('i686' 'x86_64')
url="http://slic3r.org/"
license=('GPL' 'PerlArtistic')
depends=('perl>=5.10.0')
makedepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
source=
md5sums=()

_gitroot="git://github.com/alexrj/Slic3r"
_gitname="Slic3r"

build() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot $_gitname
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  rm -rf "$srcdir/$_gitname-build"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build"

  # install module in vendor directories.
  #PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  #make
  
  ## for packages with Build.PL, do this instead:
   perl Build.PL installdirs=vendor destdir="$pkgdir/"
   perl Build
}

package() {
  #cd "$srcdir/$_gitname-build"
  #make DESTDIR="$pkgdir/" install

  ## for packages with Build.PL, do this instead:
   perl Build install
}

# vim:set ts=2 sw=2 et:

Offline

#2 2012-03-06 09:11:00

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Creating a package for Slic3r

Remove the empty

source=

Offline

#3 2012-03-06 09:35:15

PerisH
Member
Registered: 2010-02-24
Posts: 24

Re: Creating a package for Slic3r

Ok, it works!!! Thank you

I Am installing now. I will edit this post with [Solved] when I fell sure that the program works well.

Edit1: When creating the package it ask me for use sudo, it's this normal in perl packages?

Edit2: Well, I think that I make something wrong! When makepkg ask me for the sudo password, I type it. Now my package doesn't compile. I added perl-wx to dependencies. What package correspond to libmodule-build-perl?

==> Iniciando package()...
Can't open perl script "Build": No existe el fichero o el directorio
==> ERROR: Se produjo un error en package().
    Cancelando...

Edit3: I had to reedit the PKGBUILD, in pkg()'s part. It did not build because i had to uncomment the part cd  " cd "$srcdir/......." and builds fine . Now I have to check the dependencies installed before (when I wrote the root password) and add it to fix the PKGBUILD.

Last edited by PerisH (2012-03-06 10:43:28)

Offline

#4 2012-03-06 12:42:32

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Creating a package for Slic3r

Please do not use uppercase letters in $pkgname.

Offline

Board footer

Powered by FluxBB