You are not logged in.

#1 2014-09-10 18:55:27

mkingston
Member
Registered: 2013-08-22
Posts: 4

[SOLVED] makepkg creates install path relative to current directory

I'm packaging a pcsc driver, simply so that I can have pacman manage it. I've tried various things, but I simply cannot get makepkg to generate a package which will install to /usr/ instead of my home directory. build() and package() both work just fine; but I end up with a .pkg.tar.gz that installs to my home directory. Below are both my PKGBUILD files and the output of pacman -Qlp [my].pkg.tar.gz

pkgname=acsccid
pkgver=1.0.8
pkgrel=1
pkgdesc="Control library for ACS ACR38T"
arch=('x86_64')
url="http://www.acs.com.hk/en/driver/1/acr38t-d1-plug-in-sim-sized-card-reader/"
license=('LGPL')
depends=('pcsclite' 'libusb-compat' 'flex')
source=('http://www.acs.com.hk/download-driver-unified/6258/ACS-Unified-Driver-Lnx-Mac-108-P.zip')
md5sums=('0b235156a66f280a81f949b0c9bb3052') #generate with 'makepkg -g'

build() {
  cd "ACS-Unified-Driver-Lnx-Mac-108-P"
  tar xjf "$pkgname-$pkgver.tar.bz2"
  cd "$pkgname-$pkgver/"
  ./configure --prefix=/usr --sysconfdir=/etc
  make
}

package() {
  cd "ACS-Unified-Driver-Lnx-Mac-108-P/$pkgname-$pkgver"
  make DESTDIR="$pkgdir" usbdropdir="$pkgdir/lib/pcsc/drivers" install
}
# pacman -Qlp acsccid-1.0.8-1-x86_64.pkg.tar.xz | sed "s%/home/[a-z]*/%/home/xxx/%"
acsccid /home/
acsccid /home/xxx/
acsccid /home/xxx/projects/
acsccid /home/xxx/projects/acr38t_driver_pkg/
acsccid /home/xxx/projects/acr38t_driver_pkg/pkg/
acsccid /home/xxx/projects/acr38t_driver_pkg/pkg/acsccid/
acsccid /home/xxx/projects/acr38t_driver_pkg/pkg/acsccid/lib/
acsccid /home/xxx/projects/acr38t_driver_pkg/pkg/acsccid/lib/pcsc/
acsccid /home/xxx/projects/acr38t_driver_pkg/pkg/acsccid/lib/pcsc/drivers/
acsccid /home/xxx/projects/acr38t_driver_pkg/pkg/acsccid/lib/pcsc/drivers/ifd-acsccid.bundle/
acsccid /home/xxx/projects/acr38t_driver_pkg/pkg/acsccid/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/
acsccid /home/xxx/projects/acr38t_driver_pkg/pkg/acsccid/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/Info.plist
acsccid /home/xxx/projects/acr38t_driver_pkg/pkg/acsccid/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/Linux/
acsccid /home/xxx/projects/acr38t_driver_pkg/pkg/acsccid/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/Linux/libacsccid.so

Last edited by mkingston (2014-09-11 07:34:46)

Offline

#2 2014-09-10 19:34:35

apg
Developer
Registered: 2012-11-10
Posts: 211

Re: [SOLVED] makepkg creates install path relative to current directory

mkingston wrote:
  make DESTDIR="$pkgdir" usbdropdir="$pkgdir/lib/pcsc/drivers" install

Remove the $pkgdir from usbdropdir:

  make DESTDIR="$pkgdir" usbdropdir="/lib/pcsc/drivers" install

Offline

#3 2014-09-10 22:15:35

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [SOLVED] makepkg creates install path relative to current directory

Or install the resulting package with pacman: pacman -U xxxx.pkg.tar.gz. This would be the recommended way, wouldn't it?


Matt

"It is very difficult to educate the educated."

Offline

#4 2014-09-10 22:22:28

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,548
Website

Re: [SOLVED] makepkg creates install path relative to current directory

mrunion wrote:

Or install the resulting package with pacman: pacman -U xxxx.pkg.tar.gz. This would be the recommended way, wouldn't it?

I doubt the package was installed any other way. Besides, it doesn't matter if you pacman -U, or extract the package onto your root filesystem manually, the package doesn't change.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2014-09-11 07:33:13

mkingston
Member
Registered: 2013-08-22
Posts: 4

Re: [SOLVED] makepkg creates install path relative to current directory

I have clearly misunderstood makepkg here. That sorted it. Thanks a lot for your help.

Offline

#6 2014-09-11 13:19:46

apg
Developer
Registered: 2012-11-10
Posts: 211

Re: [SOLVED] makepkg creates install path relative to current directory

I think you understand makepkg just fine.  It's make that's causing you trouble.  You were telling acsccid to install into

/home/xxx/projects/acr38t_driver_pkg/pkg/home/xxx/projects/acr38t_driver_pkg/pkg/acsccid/lib/pcsc/drivers/

which makepkg happily packaged for you.

Offline

Board footer

Powered by FluxBB