You are not logged in.

#1 2012-11-09 18:17:03

mephisto
Member
Registered: 2012-11-09
Posts: 8

[solved] Rename $pkgname and a few other questions

Hello everyone

Sorry for the spelling. English is not my first language.

I've made a small program consisting of several bash-scripts. In order to make it available to others and to learn how this is done, i've made a git-repository and a PKGBUILD which i've uploaded to the AUR.

The first mistake i made was, that i didn't add the "-git" suffix to $pkgname, because i haven't learned about it at that time.

So question one: Please could anybody delete the PKGBUILD of experms, maintained by dynaMIX, so that i can upload it as experms-git again?

The second question i have is about updates:

Let's say my program has the version 0.1. Now there is an update to 0.2. How do i handle this in the PKGBUILD? Do i just have to edit $pkgver?

And my third question:

How do i handle $md5sums since makepkg -g seems only to work with files entered in $source?

Maybe you find other mistakes i did in the PKGBUILD or have some tips for me how to make things better. I would be happy to hear about them!

Thank you very much in advance!


Here's the PKGBUILD:

# Maintainer: XXXXXXXXXXXXXXXXXXXXXXXX
pkgname=experms
pkgver=0.1
pkgrel=1
pkgdesc="Runs as daemon, monitors file-changes and adjusts permissions and ownership."
arch=('any')
url="https://github.com/open-dynaMIX/experms"
license=('GPL')
depends=('bash' 'inotify-tools' 'grep' 'procps-ng')
makedepends=('git')
_gitroot="https://github.com/open-dynaMIX/experms.git"
_gitname="experms"
backup=('etc/experms.conf')
md5sums=() #generate with 'makepkg -g'

build() {
  cd "$srcdir"
  msg "Connecting to the GIT server..."
  if [[ -d "$srcdir/$_gitname" ]] ; then
    cd "${_gitname}"
    git pull origin
    msg "The local files are updated..."
  else
    git clone "$_gitroot" "$_gitname"
  fi
  msg "GIT checkout done."
}

package() {
    cd "$srcdir/$_gitname"
    install -d $pkgdir/usr/share/$pkgname
    install -d $pkgdir/etc
    install -d $pkgdir/usr/bin
    install -d $pkgdir/usr/share/man/man1
    install -m644 -t $pkgdir/usr/share/$pkgname/ check-config.sh daemon-functions.sh COPYING README
    install -m755 experms $pkgdir/usr/share/$pkgname/
    install -m644 experms.conf $pkgdir/etc/
    install -m644 experms.1.gz $pkgdir/usr/share/man/man1/
    ln -sf /usr/share/$pkgname/experms $pkgdir/usr/bin/experms
}

Last edited by mephisto (2012-11-09 19:40:32)

Offline

#2 2012-11-09 18:56:14

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,788
Website

Re: [solved] Rename $pkgname and a few other questions

If it's a -git package, my belief is that the pkgver should be the date (in YYYYMMDD format), and that you should only bump that if you change the PKGBUILD. The pkgrel should remain as "1". Since it's a -git package, you shouldn't be bumping the version after every commit or label, or whatever, since it's the enduser's responsibility to keep track of the project's status. If they're not willing to do that, then they should stick to using "static" release packages, which should be bumped whenever there's a new version.

EDIT: Oh, and you should post your renaming/deleting query on the AUR-General mailing list.

Last edited by WorMzy (2012-11-09 18:58:03)


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

#3 2012-11-09 19:40:16

mephisto
Member
Registered: 2012-11-09
Posts: 8

Re: [solved] Rename $pkgname and a few other questions

Thank you very much for your answer!

I've decided to make a "static" release package. This solved at the same time my md5sum-question and rename-request.

Offline

#4 2012-11-09 19:56:07

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,788
Website

Re: [solved] Rename $pkgname and a few other questions

Oops, didn't see your third question. I'll answer that now, in case you're curious. The md5sum/sha*sum arrays are only used to validate the files in the source array. As far as I'm aware, in -git packages, the files are checked by git as they're cloned/pulled from the repo, so you shouldn't need to manually checksum them.

Glad you got your problem sorted in any case.


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

Board footer

Powered by FluxBB