You are not logged in.
Pages: 1
I am new to Arch and spent the last 3 hours reading the WIKI about creating packages and PKGBUILD and I was trying to install my package. Here is the situation:
I have made a theme for GTK 3. It is essentially a folder with the theme files. In order for gnome to apply the theme, it has to be in /usr/share/themes.
For that I packaged the my theme (a folder) to a tar.gz file and put it in ~/abs/mytheme (like described in the wiki). In that same directory I created a PKGBUILD file with the following content:
pkgname="mytheme"
pkgver="1.0"
pkgdesc="This is a sample desc."
arch=('any')
#This is the tar file containing the folder which belongs in /usr/share/themes
source=("$pkgname-$pkgver.tar.gz)
#I will add this later
md5sums=(SKIP)
pkgrel=1
package() {
cd $srcdir
mkdir -p $pkgdir/share/themes && cp -r MyTheme $pkgdir/share/themes
}
As you can see I don't run build, since I don't have any source code. Thus the install process is simply copying the MyTheme folder in /usr/share themes.
And here are the 2 problems:
1) It creates a .pkg.tar file and not like in the wiki described a .pkg.tar.xz
2) When running sudo pacman -S mytheme-1.0-1-any.pkg.tar I get the error message:
warning: 'mytheme-1.0-1-any.pkg.tar' is a file, did you mean -U/--upgrade instead of -S/--sync?
I hope you can help me, since all the tutorials about packaging involve building source code (which my theme does not contain)
Last edited by b_stefan (2017-03-16 23:38:41)
Offline
1) Have you edited the compression options in your makepkg.conf?
2) The error is self explanitory, pacmans -S switch is for installing packages from the repositories - you need the -U switch to install from a local file.
It's also best practice to use the install command instead of cp when writing PKGBUILDs.
Edit - You also have the wrong paths in your package function, it should be $pkgdir/usr/share/themes
Last edited by Slithery (2017-03-16 23:06:12)
Offline
Thank you so much for the answer. I can't believe I made such a trivial mistake The installation works flawlessly now.
As for the compressing options, I didn't change anything.
As for the install command: By using it, will I be able to uninstall my package, because pacman -r doesn't work (which I already suspected).
EDIT: I figguerd out how to uninstall my package and thus my last point is clear now
EDIT2: I managed to change my format to .pkg.tar.xz by modifying the makepkg.conf. By that, all my questions are answered now.
Last edited by b_stefan (2017-03-16 23:37:09)
Offline
Pages: 1