You are not logged in.

#1 2017-10-03 20:59:17

aleskva
Member
Registered: 2017-09-02
Posts: 69

[Solved] CrustaBrowser

Hello! I wanted to install Crusta browser to my Arch (&Gnome). But there was no package in AUR and `make install` did nothing. Therefore I decided to load it to AUR. I've tried to make PKGBUILD, but as I'm beginner in making PKGBUILD, I've got empty package (no binaries in there).

The package needs to be compiled by qmake. For qmake it needs qt-webengine and qt-charts as a dependency. Maybe also for running (I've didn't tried, I'm not a Crusta dev, just a regular user). The source directory is the same name as produced binary, therefore there has to be a little hack in there. finally binary have to be supplied with 3rd_party and web directories as stated in https://github.com/CrustaBrowser/Crusta … /README.md

You can see my not fully working PKGBUILD here:

# Maintainer: Crusta Browser <contact@crustabrowser.com>
pkgname=CrustaBrowser
pkgver=1.4
pkgrel=1
epoch=
pkgdesc="Crusta is fast, secure, and free web browser built for the modern web. Crusta is fully customisable so you can always make it look yours."
arch=("x86_64")
url="http://www.crustabrowser.com/"
license=('GPLv3')
groups=()
depends=()
makedepends=("qt5-charts"
             "qt5-webengine")
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("$pkgname-$pkgver.tar.gz")
noextract=()
md5sums=("2b0e84abf5930f4b317685a69aec554f")
validpgpkeys=()

prepare() {
	cd "$pkgname-$pkgver"
}

build() {
	cd "$pkgname-$pkgver"
	mv crusta src
	qmake -project
	qmake src
	make
}

check() {
	cd "$pkgname-$pkgver"
	make -k check
}

package() {
	cd "$pkgname-$pkgver"
	make DESTDIR="$pkgdir/" install
}

It is an edited sample from /usr/share/pacman. But it produces the empty directory. I think it has the same problem as the one before: make install doesn't work as I expected (maybe I'm completely wrong)

Source code: https://github.com/CrustaBrowser/CrustaBrowser
Homepage: http://www.crustabrowser.com/
Tried to compile release v1.4

Can somebody help me with creating the package for AUR (and for me)? What am I doing wrong?

PS: Maybe the name should be just `crusta`. Are there some package naming conventions for AUR?

Last edited by aleskva (2017-10-14 19:40:21)

Offline

#2 2017-10-04 01:35:47

metak
Member
Registered: 2009-09-27
Posts: 198

Re: [Solved] CrustaBrowser

aleskva wrote:

Can somebody help me with creating the package for AUR (and for me)? What am I doing wrong?

Here's what I whipped up:

pkgname=crusta
pkgver=1.4
pkgrel=1
pkgdesc="Fast, secure, and free web browser built for the modern web."
arch=('i686' 'x86_64')
url="http://www.crustabrowser.com/"
license=('GPL3')
depends=('qt5-speech' 'qt5-webengine')
makedepends=('qt5-charts')
source=("$pkgname-$pkgver.tar.gz::https://github.com/CrustaBrowser/CrustaBrowser/archive/v$pkgver.tar.gz")
sha256sums=("dcce326ec88494f06825b29ae39275acc8a7d246b200ff4a4ebea1a37c44074a")

build() {
  cd "CrustaBrowser-$pkgver/$pkgname"
  qmake-qt5 $pkgname.pro
  make
}

package() {
  cd "CrustaBrowser-$pkgver/$pkgname"
  install -Dm755 $pkgname "${pkgdir}/usr/bin/$pkgname"
  install -Dm644 res/drawables/icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg"
  sed "/^Exec=/ s/Exec=.*/Exec=crusta/" -i ../Crusta.desktop
  sed "/^Icon=/ s/Icon=.*/Icon=crusta/" -i ../Crusta.desktop
  install -Dm755 ../Crusta.desktop "$pkgdir/usr/share/applications/$pkgname.desktop"
}

I removed all the unnecessary parts and since makefile doesn't have install section you have to manally install files.
Also, next time use/run namcap on the PKGBUILD file and it will show you the most obvious mistakes and don't forget the:
https://wiki.archlinux.org/index.php/Creating_packages
https://wiki.archlinux.org/index.php/PKGBUILD

Last edited by metak (2017-10-04 01:39:38)

Offline

#3 2017-10-04 20:25:32

aleskva
Member
Registered: 2017-09-02
Posts: 69

Re: [Solved] CrustaBrowser

I see, thank you. There is a condition to install web and 3rp_parties folders along, but they are not installed by mine or your PKGBUILD, is there a chance to add this to PKGBUILD too somehow?

Last edited by aleskva (2017-10-04 20:25:54)

Offline

#4 2017-10-13 19:13:09

metak
Member
Registered: 2009-09-27
Posts: 198

Re: [Solved] CrustaBrowser

aleskva wrote:

I see, thank you. There is a condition to install web and 3rp_parties folders along, but they are not installed by mine or your PKGBUILD, is there a chance to add this to PKGBUILD too somehow?

Sorry for the late reply. The binary has to be in the same folder with those two folders (web & 3rp_parties) and that's why I made the pkgbuild file which installs the package to /opt/crusta-browser.

https://aur.archlinux.org/packages/crusta-browser-git/

Offline

#5 2017-10-14 19:39:18

aleskva
Member
Registered: 2017-09-02
Posts: 69

Re: [Solved] CrustaBrowser

Thank you, I didn't know what is the correct location for it. I'm still lost in Linux locations (On Windows 2000 it was easy: root contained just Users, Program Files and Windows, but since I moved to Linux there is plenty of folders in root I can't get used to)

Offline

#6 2017-10-14 19:53:02

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] CrustaBrowser


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB