You are not logged in.

#1 2014-02-01 10:26:34

yungtrizzle
Member
Registered: 2011-04-24
Posts: 139

[SOLVED] Empty Package from PKGBUILD

I'm writing my first PKGBUILD for an app I wrote. In the PKGBUILD my build and package functions look like this :

build() {
	cd "$srcdir/$pkgname-${pkgver//_/-}"
	qmake  
	make PREFIX=/usr
}


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

but makepkg builds an empty package without the binary. What am I doing wrong?

Last edited by yungtrizzle (2014-02-01 14:40:20)

Offline

#2 2014-02-01 10:54:51

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [SOLVED] Empty Package from PKGBUILD

It's probably a Makefile that doesn't respect the DESTDIR you're passing it. You could verify this by running `find ./pkg/` from the directory where you build; you'll probably get no results either. Looking at the Google results, qmake should accept a destdir too, so I'd try that

Offline

#3 2014-02-01 11:31:32

yungtrizzle
Member
Registered: 2011-04-24
Posts: 139

Re: [SOLVED] Empty Package from PKGBUILD

Actually /pkg/  and subdirectories exist but are empty. The binary remains in the source directory and make says nothing to be done for 'install'.

Offline

#4 2014-02-01 11:40:15

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Empty Package from PKGBUILD

Well, you wrote this app - what would you do if you were installing it manually i.e. without a PKGBUILD?

Offline

#5 2014-02-01 11:41:51

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] Empty Package from PKGBUILD

Can you manually build and install successfully?

qmake  
make PREFIX=/usr
make install DESTDIR=test

Do the needed files exist in ./test is the question.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2014-02-01 11:54:58

yungtrizzle
Member
Registered: 2011-04-24
Posts: 139

Re: [SOLVED] Empty Package from PKGBUILD

tomk wrote:

Well, you wrote this app - what would you do if you were installing it manually i.e. without a PKGBUILD?

hard code the install path and run make install

Offline

#7 2014-02-01 11:57:30

yungtrizzle
Member
Registered: 2011-04-24
Posts: 139

Re: [SOLVED] Empty Package from PKGBUILD

graysky wrote:

Can you manually build and install successfully?

qmake  
make PREFIX=/usr
make install DESTDIR=test

Do the needed files exist in ./test is the question.

./test does not exist after compiling.

Offline

#8 2014-02-01 12:09:48

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] Empty Package from PKGBUILD

Doesn't sound like your Makefile is using $(DESTDIR) then... modify it to do so.  Use this as an example if you need one: https://github.com/graysky2/profile-syn … r/Makefile


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2014-02-01 12:28:36

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [SOLVED] Empty Package from PKGBUILD

yungtrizzle wrote:

Actually /pkg/  and subdirectories exist but are empty. The binary remains in the source directory and make says nothing to be done for 'install'.

Did you try passing DESTDIR to qmake as I suggested?

Offline

#10 2014-02-01 12:34:17

yungtrizzle
Member
Registered: 2011-04-24
Posts: 139

Re: [SOLVED] Empty Package from PKGBUILD

graysky wrote:

Doesn't sound like your Makefile is using $(DESTDIR) then... modify it to do so.  Use this as an example if you need one: https://github.com/graysky2/profile-syn … r/Makefile

That won't work in my case, the makefile is generated from qmake, anything I change will be overwritten.

@Spider.007 add DESTDIR doesn't make any changes

Last edited by yungtrizzle (2014-02-01 12:36:35)

Offline

#11 2014-02-01 12:48:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,517
Website

Re: [SOLVED] Empty Package from PKGBUILD

qmake project files should include DESTDIR.  This is in every tutorial I can fnd on qmake, and would come up with a google search of "qmake DESTDIR" or just "qmake".

If you want more help you're going to have to share the actual files you're creating - particularly the project file.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#12 2014-02-01 12:48:51

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

Re: [SOLVED] Empty Package from PKGBUILD

You might have success with make INSTALL_ROOT=... install
http://davmac.wordpress.com/2007/02/21/qts-qmake/


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

Offline

#13 2014-02-01 13:14:07

yungtrizzle
Member
Registered: 2011-04-24
Posts: 139

Re: [SOLVED] Empty Package from PKGBUILD

 
QT       += core gui multimedia multimediawidgets dbus

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = cleps
TEMPLATE = app
DESTDIR = /usr/bin

This my .pro relevant section. make now complains about permissions.

@progandy

can't view your link I'm behind the gfw so its blocked

Offline

#14 2014-02-01 14:36:23

yungtrizzle
Member
Registered: 2011-04-24
Posts: 139

Re: [SOLVED] Empty Package from PKGBUILD

I think I got it to work. Had to make changes to the .pro file and use INSTALL_ROOT

Offline

#15 2014-02-07 00:32:00

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: [SOLVED] Empty Package from PKGBUILD

Could you share these changes? Do they happen in the snippet of code of the qmake file you have posted?

Offline

#16 2014-03-31 16:10:42

yungtrizzle
Member
Registered: 2011-04-24
Posts: 139

Re: [SOLVED] Empty Package from PKGBUILD

@thiagowfx sorry i just say your postbut here's what working for me

QT       += core gui multimedia multimediawidgets dbus

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = cleps
TEMPLATE = app
target.path = /usr/bin/

INSTALLS += target

Offline

Board footer

Powered by FluxBB