You are not logged in.

#1 2016-12-28 13:40:37

Chocopuff
Member
Registered: 2016-10-02
Posts: 26

[SOLVED] Help with PKGBUILD for snapcraft-gui

Hi,

I'm having trouble with making a pkgbuild for snapcraft-gui
https://github.com/snapcraft-gui/snapcraft-gui

This is what I have so far

pkgname=snapcraft-gui
pkgver=3.0
pkgrel=1
pkgdesc="Graphical user interface to create snaps using Snapcraft as the backend"
arch=()
url="http://snapcraft.io/"
license=('GPL')
depends=('qt5' 'snapcraft' 'pastebinit' 'tree')
makedepends=()
source=("$pkgname-$pkgver.tar.gz"
md5sums=


build() {
cd "$srcdir"/snapcraft-qt/
qmake
make
}


package() {


}

There are a few things i'm not sure about. I can't seem to find any documentation on qmake. Should it be a makedepends? I am aware it is part of qt, but i don't think it is a package.
Secondly, after the build process is completed, there is a desktop starter/file that is created that can be used to launch, but this isn't really "installing" the application right?  You need to install into the correct
directories using

install -Dm 644 <source> <directory>

with relevant flags and permission settings and directories. I don't know where I am supposed to install all this. How do you know where to put everything?
Do I move all the files created from the build process?
Finally, I'm not sure how to get a link to the files/ what I should put into the source=() line. I don't think git clone would be a good idea? I've seen it done only once. Every other PKGBUILD i've seen uses a direct url/ftp server or something.

Thanks!

Edit:
About where the files go, I've found this resource:
http://refspecs.linuxfoundation.org/FHS … ERCOMMANDS
looking into it. Advice on this still appreciated nonetheless big_smile

Last edited by Chocopuff (2016-12-31 03:49:50)

Offline

#2 2016-12-28 14:29:18

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [SOLVED] Help with PKGBUILD for snapcraft-gui

about qmake :

$ which qmake
/usr/bin/qmake
$ pacman -Fo /usr/bin/qmake
usr/bin/qmake is owned by extra/qt5-base 5.7.1-1
$

Using qt5-base as depend insteadof qt5 would be cleaner imo.

source url :
You could use one of the releases at https://github.com/snapcraft-gui/snapcraft-gui/releases , or

If you do prefer to build a *-git package , see https://wiki.archlinux.org/index.php/VC … guidelines


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2016-12-28 21:51:55

mis
Member
Registered: 2016-03-16
Posts: 234

Re: [SOLVED] Help with PKGBUILD for snapcraft-gui

Usually in the package() function you use something like the following. And _if_ the Makefile is well written it installs all needed files into their proper directories

make DESTDIR="$pkgdir" install

In this case it is

make INSTALL_ROOT="$pkgdir" install

You can find this by looking at the Makefile that is generated when you run qmake-qt5

I don't know anything about snapcraft-gui, but running the above installs only one file (the executable) to /opt/snapcraft-gui/
I would say if that's the only file, you could install it to /usr/bin/

install -Dm 755 snapcracft-gui "$pkgdir"/usr/bin/snapcraft-gui

.desktop files are usually installed into /usr/share/applications/
and the icon referenced in the .desktop file into /usr/share/pixmaps/

If you do this you might have to adjust the path of the executable in the .desktop file.

edit:
Regarding recommended directories in general: https://wiki.archlinux.org/index.php/Ar … irectories

Last edited by mis (2016-12-28 21:55:22)

Offline

#4 2016-12-31 03:53:52

Chocopuff
Member
Registered: 2016-10-02
Posts: 26

Re: [SOLVED] Help with PKGBUILD for snapcraft-gui

mis and Lone_Wolf, thanks for the help! I've finally managed to get it working and got it pushed to the AUR.

Offline

Board footer

Powered by FluxBB