Skip to content

Problem With PKGBUILD and makepkg

Removed before it was archived.

Edited 19 Aug 2020. We only hold this version.

0 points9 comments
Open on Reddit
About this post
Posted
Archived
Deleted on
Edited
Score
0 · 50% up
Kind
Text
ID
icsgl4

9 comments

I think you need to cd into the directory after build

1 points

I tried cd "$pkgname" before make command in build() section.

But this error showed:

==> Starting build()...

~/Downloads/noip-2.1.9-1/PKGBUILD: line 10: cd: noip-2.1.9-1: No such file or directory

==> ERROR: A failure occurred in build().

1 points

This is your problem, but I can't spot what the error is. It'd be a good idea to get into the habit of properly handle the release number though.

2 points

EDIT: Isn't this the same as https://aur.archlinux.org/packages/noip/ ?

The build and package functions start in SRCDIR, which is usually the src/ directory in the same place as your PKGBUILD. The source will be extracted inside there, and the directory name will depend on how the source tarball is structured. Look inside src/ to find the correct name.

Some other things:

  • pkgname=noip -- don't put the version here
  • pkgver=2.1.9 -- it goes here
  • pkgrel=1 -- this starts at one. Its the Arch package number for this version number. If you change the PKGBUILD without changing pkgver you increment it. When you change pkgver to get a new source version, you reset pkgrel to 1.
  • In package, you should use make DESTDIR="$pkgdir/" install otherwise it will try to install directly into your system. Setting the DESTDIR makes it place the files where makepkg expects them.
  • If you're going to put this on the AUR, make sure you add a license, checksums, dependencies etc (even if its just for yourself, you should at least add the dependencies). In general, start with https://wiki.archlinux.org/index.php/Creating_packages
1 points

Although I don't maintain any packages on the AUR, I noticed some things are wrong from what I've seen in PKGBUILDs from the AUR. Your variables should be set up like:

pkgname=("noip")

pkgver=2.1.9

pkgrel=1

So that when someone installs the package, it'll be installed as noip-2.1.9-1.

And regarding the error during build(), I believe you should do a cd $srcdir first and then start building. You should refer to other PKGBUILDs from the AUR, I'm not completely sure about this.

1 points

Do you use cw ? Colour wrapper wraps file and causes similar issues

1 points

alternative pkg for no-ipupdater

aur/inadyn-fork 2.7-1 (14, 0.00)

Dynamic DNS client with SSL/TLS support

aur/inadyn-fork-git 2.3.1.r0.gedd31bd-1 (0, 0.00)

Dynamic DNS client with SSL/TLS support

aur/inadyn-mt 02.28.10-1 (8, 0.00)

A simple dynamic DNS client based on inadyn

​

#/etc/inadyn.conf

background

verbose 1

period 300

cache-dir /home/$USER/.cache/noip

startup-delay 60

logfile /home/$USER/.logs/ddns.log

pidfile /run/inadyn/inadyn.pid

​

​

system default@no-ip.com

username no-ip username

password no-ip passwd

alias url of no-ip hostname

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.