You are not logged in.
thank you very much guys, really. So, tryin to recap, the issue was that the package uwv was missing. Then loqs prepared that pkgbuild file that essentially grabs uwv source and compile it. With
makepkg -si I created and installed the package. At this point the dependencies for compile lan-play are satisfacted and I was able to preceed to compile it from source obtaining an executable.
All correct?
Offline
Yes you needed uwv and to pass the options to cmake to make it use the system libuv and uvw which was provided by the newly installed uvw package.
You might want to consider creating a PKGBUILD for switch-lan-play so pacman can manage it as well.
Offline
Yes, it would be a shame to let your experience building this package to go to waste, and loqs has provided a good example on how to write a PKGBUILD for a cmake -using package.
In any case, please remember to mark your thread as solved.
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
thank you loqs but i do not need to manage it with pacman, creating an executable it is enough, because i am going to use it very seldom.
I'd like to ask if uwv package i created and installed manualy could led to dependecies problem in the future. I mean, if some dependencies maybe in the main repositories will be updated, could that package create some sort of problems?
Offline
Yes, it would be a shame to let your experience building this package to go to waste, and loqs has provided a good example on how to write a PKGBUILD for a cmake -using package.
In any case, please remember to mark your thread as solved.
you're right, and the loqs contribute, proposing an example of PKGBUILD file is really precious
Offline
thank you loqs but i do not need to manage it with pacman, creating an executable it is enough, because i am going to use it very seldom.
I'd like to ask if uwv package i created and installed manualy could led to dependecies problem in the future. I mean, if some dependencies maybe in the main repositories will be updated, could that package create some sort of problems?
Seldom-used packages are just as important to create with a PKGBUILD, since otherwise it might be difficult to keep track of what is installed. ![]()
Anyway, uwv is entirely headers, so it should never break due to upgrades with libuv, unless libuv changes the way it works and a uvw change is needed as well, but in that case there should be a new uvw release for that. And uvw is only needed for compiling the executable, not for using it, so you'll notice issues with uvw due to things not compiling correctly.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thank you eschwartz! Last 2 things:
1. what is exactly and header of a software? They are piece of code needed to compile something?
2. Why loqs in pkgbuild indicated libuv source in github? Libuv is in the exrra repositories
Last edited by jacopastorius (2019-01-17 07:29:51)
Offline
depends=('libuv')PKGBUILD#depends
Edit:
PKGBUILD for switch-lan-play depends on uvw (note sha256sums is the last line I altered so the build is expected to fail in prepare)
pkgname=switch-lan-play
pkgver=0.0.7
pkgrel=1
pkgdesc="Make you and your friends play games like in a LAN."
arch=('x86_64')
url="https://github.com/spacemeowx2/switch-lan-play"
license=('GPL3')
depends=('uvw')
makedepends=('cmake')
source=("https://github.com/spacemeowx2/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('0b645fa8bbff18b4b2d1dfd8d975790c6597bc0520c0ab1368387d08f8c2c900')
prepare() {
cd "$pkgname-$pkgver"
patch -p1 -i "$srcdir/$pkgname-$pkgver.patch"
}
build() {
cd "$pkgname-$pkgver"
./configure --prefix=/usr
make
}
check() {
cd "$pkgname-$pkgver"
make -k check
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
}What happens when the dependency is not met
makepkg -si
==> Making package: switch-lan-play 0.0.7-1 (Thu 17 Jan 2019 15:10:53 UTC)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: uvw
==> ERROR: 'pacman' failed to install missing dependencies.Last edited by loqs (2019-01-17 15:16:27)
Offline
Thank you loqs! But i can't get why you indicated the github source of libuv for creating uvw package. Is it possible to tell in PKGBUILD file to install package dependencies from the main repos (if they are vailable obviously)?
With this line, are you telling in PKGBUILD to retrieve libuv source from github?
source=("https://github.com/skypjack/uvw/archive/v1.12.0_libuv-v1.24.tar.gz")Last edited by jacopastorius (2019-01-17 16:15:00)
Offline
source=("https://github.com/skypjack/uvw/archive/v1.12.0_libuv-v1.24.tar.gz")https://github.com/skypjack/uvw#versioning the archive name is encoding both the version of uvw it is supplying and the version of libuv it is targeting.
The archive does not contain libuv. The depends line in the PKGBUILD requires the libuv package to be installed when building or installing the package.
Offline
ok but, can i say in pkgbuild to install it from arch repos, instead of downloading from github?
Offline
ok but, can i say in pkgbuild to install it from arch repos, instead of downloading from github?
Yes. See post #33
Offline
ok, thanks! I am sorry for asking multiple times but you're a little bit cryptic in your writing. But I really appreciate that: it is very helpful because requires a little of thinking and digging in things
Offline
I think the following is the minimal needs for a PKGBUILD it does not do anything apart from creating an empty package min-1-1-any.pkg.tar.xz that pacman can install.
pkgname=min
pkgver=1
pkgrel=1
arch=('any')Now adding a dependency
pkgname=min
pkgver=1
pkgrel=1
arch=('any')
depends=('libuv')When building the package with the command `makepkg` it will check if libuv is installed and will fail if it is not.
When building with `makepkg -s` if libuv is not installed it will prompt to install it using sudo pacman.
When installing min-1-1-any.pkg.tar.xz with `pacman -U min-1-1-any.pkg.tar.xz` libuv must already installed on the system or be installed at the same time.
Last edited by loqs (2019-01-17 22:58:47)
Offline
Ok. What about the integrity check with sha256 sums or other encryption keys modes? Where do I get those checksum strings?
Offline
PKGBUILD#Integrity covers how to generate the checksum string. If upstream publishes a checksum you could compare it with that.
Offline
Loqs linked to the PKGBUILD wiki page back in post #23. I recommend you read it, it will answer most of your questions.
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