You are not logged in.

#1 2015-04-04 09:13:12

Deuchnord
Member
Registered: 2015-04-04
Posts: 11

Why does my PKGBUILD run qmake?

Hi

I'm creating my first PKGBUILD and asked on the French-speaking IRC channel for help to check if there weren't any mistakes this morning, and after some tips, the person who helped me tried to compile and install the program in order to check if all worked on his environment.

But he got troubled with a strange issue that I could not understand: after compiling, it seems that makepkg runs `qmake-qt5` without I asked it to do this, overwriting the `install` part of the Makefile I wrote. A more strange thing is that `qmake-qt5` is not run on my environment when I run `makepkg` hmm
This is my PKGBUILD:

# Maintainer: Jérôme Deuchnord <contact@deuchnord.tk>
pkgname=deuchnord-hermes
pkgver=0.6
pkgrel=1
pkgdesc="A warranties manager"
arch=('i686' 'x86_64')
url="http://www.deuchnord.tk/projets/hermes"
license=('custom:MIT')
depends=('qt5-base' 'sane' 'imagemagick')
makedepends=('qt5-base')
source=("http://www.deuchnord.tk/dl/$pkgname-$pkgver.tar.gz")
md5sums=('eda119d88f4fc4773f6e1e2d60dc5895')

build() {
	make
}

package() {
	cd "$pkgdir"
	mkdir -p usr/bin usr/share/icons usr/share/applications
	cd "$srcdir"
	make DESTDIR="$pkgdir/" install
}

Can someone tell me why `qmake-qt5` is run on some environments on not on others?

Thanks in advance for your answers

Offline

#2 2015-04-04 11:08:52

Bevan
Member
Registered: 2009-09-08
Posts: 99

Re: Why does my PKGBUILD run qmake?

There are a few calls of qmake in your Makefile. Just look for "$(QMAKE)". You may remove everything from "Makefile:" to "qmake_all: FORCE" and also remove Makefile from the all-target.
That said: Isn't there a possibility to add the install stuff into your project so that qmake generates a complete Makefile in the first place?

Two other small nitpicks:
* All files in the tar.gz file should be inside a folder called deuchnord-hermes-0.6
* make install should create all necessary folders so you don't need to do that manually (or in the PKGBUILD)

Offline

#3 2015-04-04 11:16:52

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: Why does my PKGBUILD run qmake?

That is a qmake generated Makefile. If it is older than the qmake headers, then it is regenerated. I would force qmake to run every time and add the qmake command to build()

qmake-qt5 -o Makefile deuchnord-hermes.pro

If you want an install target, then you'll have to define it in the project (.pro) file, not the Makefile.
http://stackoverflow.com/questions/9377 … s-variable

Last edited by progandy (2015-04-04 11:19:25)


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

Offline

#4 2015-04-04 11:22:17

Deuchnord
Member
Registered: 2015-04-04
Posts: 11

Re: Why does my PKGBUILD run qmake?

Bevan wrote:

Isn't there a possibility to add the install stuff into your project so that qmake generates a complete Makefile in the first place?

progandy wrote:

That is a qmake generated Makefile. If it is older than the qmake headers, then it is regenerated. I would force qmake to run every time and add the qmake command to build()

qmake-qt5 -o Makefile deuchnord-hermes.pro

The problem is that the Makefile generated by qmake-qt5 writes by default:

install:   FORCE
Bevan wrote:

* All files in the tar.gz file should be inside a folder called deuchnord-hermes-0.6

What do you mean? hmm

Offline

#5 2015-04-04 11:42:07

Bevan
Member
Registered: 2009-09-08
Posts: 99

Re: Why does my PKGBUILD run qmake?

Deuchnord wrote:
Bevan wrote:

* All files in the tar.gz file should be inside a folder called deuchnord-hermes-0.6

What do you mean? hmm

The tar.gz should extract a single folder containing your sources. That way it does not scatter around its contents e.g. if someone extracts it inside of their home directory. What you often see is that this single folder is named like the tar.gz itself, just without the extension. But that was just a random note, nothing related to your problem wink

Offline

#6 2015-04-04 11:45:40

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: Why does my PKGBUILD run qmake?

Deuchnord wrote:

The problem is that the Makefile generated by qmake-qt5 writes by default:

If you want custom targets, let qmake output in e.g. Makefile.qt and then include that in your custom Makefile. Or you could try QMAKE_EXTRA_TARGETS or QMAKE_EXTRA_UNIX_TARGETS.
And why don't you like "install:   FORCE"?


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

Offline

#7 2015-04-04 14:04:53

Deuchnord
Member
Registered: 2015-04-04
Posts: 11

Re: Why does my PKGBUILD run qmake?

progandy wrote:

If you want custom targets, let qmake output in e.g. Makefile.qt and then include that in your custom Makefile. Or you could try QMAKE_EXTRA_TARGETS or QMAKE_EXTRA_UNIX_TARGETS.
And why don't you like "install:   FORCE"?

Because with this target, `make` answers me that there is nothing to do hmm

Offline

Board footer

Powered by FluxBB