You are not logged in.
Hi, I'm new at packaging, I wanted to create one of this plugin, which is literally one file to be installed in the /lib directory, the problem is that the package, for some reason, replaces the hole directory, making all files to disappear. How do I fix that? Here's the PKGBUILD
pkgname=plymouth-openrc-plugin
pkgver=0.1.2
pkgrel=1
pkgdesc="Plymouth plugin for OpenRC "
arch=('any')
url="https://github.com/aidecoe/plymouth-openrc-plugin"
license=('GPL2')
depends=()
backup=('plymouth.so')
source=("https://github.com/aidecoe/$pkgname/archive/master.zip")
md5sums=('59c6cf5e4cfba53679e40efea5a64dcc')
build() {
cd "$srcdir/$pkgname-master"
make
}
package() {
cd "$srcdir/$pkgname-master"
make DESTDIR="$pkgdir" install
}
Last edited by Sori Ano (2017-03-11 21:14:38)
Offline
First, remove the needless "HELP" from your title. These are help forums, we know you need help. Further, the post is in the Creating & Modifying Packages subforum, so we know it's for creating a PKGBUILD, so that tells us nothing. Replace it with something informative like what tool/package you want help with.
As to the PKGBUILD, get rid of the 'backup' variable - that doesn't make any sense for a compiled object file. You can remove the empty depends (if there really aren't any). 'arch' should not by "any" as this is compiled. Also if you are pulling the most recent code from git, do not use the zip file, just use the git url and append '-git' to the pkgname and put 'SKIP' in the checksum array: otherwise this will break as soon as upstream makes a revision. Alternatively, get a tagged version from their git history.
As to the problem you claim to have, can you describe that more. The PKGBUILD you've shown could not have the effect you describe.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Are you sure?
Pacman never deletes files unless instructed to by the package, which yours doesn't do.
Also there are a few issues with your PKGBUILD, as you're building from git master you need to append -git to the pkgname and add a pkgver function to get the correct version. Check the wiki for details.
Offline
Ok, this is REALLY strange. Packages are unable to overwrite the /lib directory, and when removing the package that I made, then they can. Also, when removing it, the /lib directory disappears.
Offline
There is no /lib directory on Arch. /lib should be a symlink pointing to /usr/lib. Pacman will refuse to install packages that try to install to /lib, so if you managed to install one, you unwisely used '--force'. After that, removing the package shouldn't remove /lib, unless you also removed the filesystem package.
What have you actually done, and what are you actually trying to do?
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
Also if you are pulling the most recent code from git, do not use the zip file, just use the git url and append '-git' to the pkgname and put 'SKIP' in the checksum array: otherwise this will break as soon as upstream makes a revision. Alternatively, get a tagged version from their git history.
But that plugin is no longer developed, so should I do what you say anyway? or as it is obsolete, it is unnecessary?
Offline
There is no /lib directory on Arch. /lib should be a symlink pointing to /usr/lib. Pacman will refuse to install packages that try to install to /lib, so if you managed to install one, you unwisely used '--force'. After that, removing the package shouldn't remove /lib, unless you also removed the filesystem package.
What have you actually done, and what are you actually trying to do?
I already noted that it is a symlink, but the plugin writed in the /lib directory. What I'm trying to do is to install the plymouth.so file generated when running make, and install it to /lib/rc/plugins
So, what I think is that there are 3 possible solutions:
1) I fork the repository so I correct the directories
2) Include the precompiled file, and just copy it and give the correct permissions
3) Leave it as it is, but in the package() function and replace make install by cp $srcdir/plymouth.so $pkgdir/usr/lib/rc/plugins
I'll try option 3 to see what happens.
Offline
ok, so I tried
pkgname=plymouth-openrc-plugin
pkgver=0.1.2
pkgrel=1
pkgdesc="Plymouth plugin for OpenRC "
arch=('x86_64' 'i686' 'armv7h')
url="https://github.com/aidecoe/plymouth-openrc-plugin"
license=('GPL2')
source=("git+https://github.com/aidecoe/plymouth-openrc-plugin.git")
md5sums=('SKIP')
build() {
cd "$srcdir/$pkgname"
make
}
package() {
cd "$srcdir/$pkgname"
mkdir -p $pkgdir/usr/lib/rc/plugins
cp plymouth.so $pkgdir/usr/lib/rc/plugins
}
and no problems, now I'll test it
Offline
solved, but the PKGBUILD can improve anyways
Offline
Looking at the PKGBUILD, this is intended to work with the openrc package used by systemd-free.org ?
If that's correct, please make that clear in pkgdesc .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline