You are not logged in.

#1 2017-08-07 18:18:24

karlospv94
Member
Registered: 2016-10-12
Posts: 100

[SOLVED] Doubt with make call from package()

I am just creating my own archlinux package but instead of reading the wiki I don't understand well how to install it without use sudo.

This is my package():

(...)
package() {
  cd "$pkgname"
  make DESTDIR="$pkgname" install
}
(...)

And this is my Makefile:

(...)
install: mofiles man
	install -Dm755 $(PKG).sh $(DESTDIR)/usr/bin/$(PKG)
	install -Dm644 completion/bash $(DESTDIR)/usr/share/bash-completion/completions/$(PKG)
	install -Dm644 completion/zsh $(DESTDIR)/usr/share/zsh/site-functions/_$(PKG)
	install -Dm644 $(PKG).8 $(DESTDIR)/usr/share/man/man8/$(PKG).8
(...)

But when I execute

makepkg 

all is installed inside the folder of the downloaded package, not in the system.

I firstly did it using

sudo make install

in my package() but I read It was not the right way

Last edited by karlospv94 (2017-08-07 18:51:00)

Offline

#2 2017-08-07 18:20:48

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Doubt with make call from package()

DESTDIR should be $pkgdir, not $pkgname.

Can you post your full PKGBUILD please.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-08-07 18:27:07

karlospv94
Member
Registered: 2016-10-12
Posts: 100

Re: [SOLVED] Doubt with make call from package()

slithery wrote:

DESTDIR should be $pkgdir, not $pkgname.

Can you post your full PKGBUILD please.


I have modified it but I don't get the package installed in the system

pkgname=checkpkg
pkgver=1.0
pkgrel=1
pkgdesc="Bash script for checking updates of given packages"
arch=('any')
url="https://github.com/carmilso/$pkgname"
license=('GPL3')
source=("https://github.com/carmilso/paccheck/releases/download/v$pkgver/v$pkgver.tar.gz")

package() {
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}

Offline

#4 2017-08-07 18:46:14

karlospv94
Member
Registered: 2016-10-12
Posts: 100

Re: [SOLVED] Doubt with make call from package()

My fault...

I didn't read well the section "Testing the PKGBUILD and package" of https://wiki.archlinux.org/index.php/Creating_packages

Last edited by karlospv94 (2017-08-07 18:50:39)

Offline

#5 2017-08-07 18:55:44

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Doubt with make call from package()

That is correct.

Have you actually installed the package that makepkg has created?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2017-08-07 18:57:11

karlospv94
Member
Registered: 2016-10-12
Posts: 100

Re: [SOLVED] Doubt with make call from package()

slithery wrote:

That is correct.

Have you actually installed the package that makepkg has created?

Yes. I forgot installing the ".pkg.tar.xz" with pacman. Now it is well installed.

Thanks!

Offline

Board footer

Powered by FluxBB