You are not logged in.

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

yungtrizzle
Member
From: Nanjing, China
Registered: 2011-04-24
Posts: 130

[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)


No trees No codes : equal exchange

Offline

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

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

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
From: Nanjing, China
Registered: 2011-04-24
Posts: 130

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'.


No trees No codes : equal exchange

Offline

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

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

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
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,520
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
From: Nanjing, China
Registered: 2011-04-24
Posts: 130

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


No trees No codes : equal exchange

Offline

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

yungtrizzle
Member
From: Nanjing, China
Registered: 2011-04-24
Posts: 130

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.


No trees No codes : equal exchange

Offline

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

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,520
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,143
Website

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
From: Nanjing, China
Registered: 2011-04-24
Posts: 130

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)


No trees No codes : equal exchange

Offline

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

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,804
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.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

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

progandy
Member
Registered: 2012-05-17
Posts: 2,151

Re: [SOLVED] Empty Package from PKGBUILD

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

Offline

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

yungtrizzle
Member
From: Nanjing, China
Registered: 2011-04-24
Posts: 130

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


No trees No codes : equal exchange

Offline

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

yungtrizzle
Member
From: Nanjing, China
Registered: 2011-04-24
Posts: 130

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


No trees No codes : equal exchange

Offline

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

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

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
From: Nanjing, China
Registered: 2011-04-24
Posts: 130

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

No trees No codes : equal exchange

Offline

Board footer

Powered by FluxBB