You are not logged in.

#1 2020-12-07 08:53:09

RedArcher
Member
From: South Africa
Registered: 2009-09-03
Posts: 76

[SOLVED] magnetico-git a-1 (doesn't install)

https://aur.archlinux.org/packages/magnetico-git/
Autonomous (self-hosted) BitTorrent DHT search engine suite

ERROR

[red@workstation magnetico-git]$ makepkg -sri
==> Making package: magnetico-git a-1 (Mon Dec  7 10:45:46 2020)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating magnetico git repo...
Fetching origin
==> Validating source files with sha256sums...
    magnetico ... Skipped
==> Extracting sources...
  -> Creating working copy of magnetico git repo...
Reset branch 'makepkg'
==> Starting pkgver()...
==> Updated version: magnetico-git v0.12.0.r5.g9f90246-1
==> Removing existing $pkgdir/ directory...
==> Starting build()...
/home/red/PKGBUILD/magnetico-git/PKGBUILD: line 22: cd: /home/red/PKGBUILD/magnetico-git/src/magnetico/magneticod: No such file or directory
==> ERROR: A failure occurred in build().
    Aborting...

PKGBUILD

pkgname=magnetico-git
_pkgname=magnetico
pkgver=v0.12.0.r5.g9f90246
pkgrel=1
pkgdesc="Autonomous (self-hosted) BitTorrent DHT search engine suite"
arch=('any')
options=('!strip')
url="http://labs.boramalper.org/magnetico/"
license=('AGPLv3')
depends=('python-uvloop' 'python-humanfriendly' 'python-better-bencode' 'python-gevent' 'python-flask' 'python-cerberus')
makedepends=('python-setuptools')
provides=('magnetico')
source=("git://github.com/boramalper/magnetico")
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir/$_pkgname/magneticod"
  python setup.py build

  cd "$srcdir/$_pkgname/magneticow"
  python setup.py build
}

package() {
  cd "$srcdir/$_pkgname/magneticod"
  python setup.py install --root="$pkgdir/" --optimize=1

  cd "$srcdir/$_pkgname/magneticow"
  python setup.py install --root="$pkgdir/" --optimize=1
}

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

Last edited by RedArcher (2020-12-09 20:35:21)

Offline

#2 2020-12-07 08:59:24

progandy
Member
Registered: 2012-05-17
Posts: 4,143

Re: [SOLVED] magnetico-git a-1 (doesn't install)

The repository structure has changed since the PKGBUILD was written. The project has also switched from python to golang.

Last edited by progandy (2020-12-07 09:25:31)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2020-12-07 09:19:47

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,201
Website

Re: [SOLVED] magnetico-git a-1 (doesn't install)

Mod note: moving to AUR Issues


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2020-12-07 21:05:34

loqs
Member
Registered: 2014-03-06
Posts: 13,008

Re: [SOLVED] magnetico-git a-1 (doesn't install)

Build tested only

pkgname=magnetico-git
_pkgname=magnetico
pkgver=0.12.0.r5.g9f90246
pkgrel=1
pkgdesc='Autonomous (self-hosted) BitTorrent DHT search engine suite'
arch=('x86_64')
url="https://labs.boramalper.org/magnetico/"
license=('AGPL')
depends=('gcc-libs')
makedepends=('go' 'go-bindata' 'git')
source=("git+https://github.com/boramalper/magnetico.git")
sha256sums=('SKIP')

prepare(){
  cd $_pkgname
  mkdir -p build/
}

pkgver() {
  cd $_pkgname
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd $_pkgname
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -modcacherw" #-mod=readonly

  go build -o build --tags fts5 "-ldflags=-s -w -X main.compiledOn=`date -u +%Y-%m-%dT%H:%M:%SZ`" ./cmd/magneticod
  go-bindata -pkg "main" -o="cmd/magneticow/bindata.go" -prefix="cmd/magneticow/data/" cmd/magneticow/data/...
  # Prepend the linter instruction to the beginning of the file
  sed -i '1s;^;//lint:file-ignore * Ignore file altogether\n;' cmd/magneticow/bindata.go
  go build -o build --tags fts5 "-ldflags=-s -w -X main.compiledOn=`date -u +%Y-%m-%dT%H:%M:%SZ`" ./cmd/magneticow
}

package() {
  cd $_pkgname
  install -Dm755 build/{magneticod,magneticow}  -t "$pkgdir"/usr/bin
}

Edit:
Fixed pkgdesc missing end quote.

Last edited by loqs (2020-12-09 02:41:35)

Offline

#5 2020-12-08 22:30:42

RedArcher
Member
From: South Africa
Registered: 2009-09-03
Posts: 76

Re: [SOLVED] magnetico-git a-1 (doesn't install)

Thank!

$ makepkg -sri
/home/red/PKGBUILD/magnetico-git/PKGBUILD: line 35: unexpected EOF while looking for matching `''
/home/red/PKGBUILD/magnetico-git/PKGBUILD: line 43: syntax error: unexpected end of file
==> ERROR: Failed to source /home/red/PKGBUILD/magnetico-git/PKGBUILD

Offline

#6 2020-12-09 02:20:39

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,936

Re: [SOLVED] magnetico-git a-1 (doesn't install)

pkgdesc is missing ending quote. Text editors have syntax highlighting to make this obvious. big_smile


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2020-12-09 02:47:31

loqs
Member
Registered: 2014-03-06
Posts: 13,008

Re: [SOLVED] magnetico-git a-1 (doesn't install)

Fixed the pkgdesc.  After posting the PKGBUILD i noticed the pkgdesc was

pkgdesc='Go PKGBUILD Example'

So I copied over the description from original PKGBUILD missing the final quote.  Sorry about that.

Offline

#8 2020-12-09 20:35:46

RedArcher
Member
From: South Africa
Registered: 2009-09-03
Posts: 76

Re: [SOLVED] magnetico-git a-1 (doesn't install)

Thank you so much!

Offline

Board footer

Powered by FluxBB