You are not logged in.

#1 2014-06-13 14:51:43

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Review my edited diffpac PKGBUILD

I like the too (diffpac), but the package is more than 10 years old so it's PKGBUILD is not working propperly. It builds and installs but binary can't be run.
That's why I decided to make a new PKGBUILD, which works but I don't know if it fully abides the rules of uploading.

Here it is:

pkgname=diffpac
pkgver=20140613
pkgrel=2
pkgdesc="Stand alone replacemnet for pacdiffviewer"
arch=('i686' 'x86_64')
makedepends=('git')
depends=('grep' 'sed' 'coreutils' 'bash' 'awk' 'pacman' 'diffutils' 'patch' 'findutils')
optdepends=('colordiff: colorized diff output')
_gitroot='git://github.com/bruenig/diffpac.git'
_gitname='diffpac'
provides=('diffpac')
package() {
	
	cd "$startdir/src"
	if [ -d "$startdir/src/$_gitname" ] ; then
		cd $_gitname && git pull origin
	else
		git clone "$_gitroot"
		cd $_gitname
	fi
	mkdir -p "$pkgdir/usr/bin"
	install -m 755 diffpac "$pkgdir/usr/bin/diffpac"
}

Also I found nothing about the licence. Should I just write "none", or what?
And how to submit it, since I'm not the "owner" of the first release?

Last edited by bstaletic (2014-06-13 14:54:43)

Offline

#2 2014-06-13 14:57:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Review my edited diffpac PKGBUILD

You don't need to list all these depends https://wiki.archlinux.org/index.php/AUR#Prerequisites

Offline

#3 2014-06-13 15:38:07

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Review my edited diffpac PKGBUILD

Wiki says it is assumed that the whole base-devel is installed, is it the same for base package group? If so there are no dependacies (excluding optional and make).

Last edited by bstaletic (2014-06-13 15:39:59)

Offline

#4 2014-06-13 15:45:16

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Review my edited diffpac PKGBUILD

This is based on a very old template. Please see https://wiki.archlinux.org/index.php/VC … Guidelines

As for the deps, whether base can be assumed isn't something everyone agrees on. You don't have to include deps that are already satisfied by another program, though. For instance, pacman requires bash, so you don't need to explicitly have bash in the deps if you already have pacman.

Offline

#5 2014-06-13 16:34:35

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

Re: Review my edited diffpac PKGBUILD

bstaletic wrote:

Wiki says it is assumed that the whole base-devel is installed, is it the same for base package group?

See the first purple note: https://wiki.archlinux.org/index.php/Makepkg#Usage

I don't know if this is an official policy, but I treat it as such.

You don't have to include deps that are already satisfied by another program, though.

I could argue that this would cause problems if the dependencies you omit for this reason are later dropped by the package you were relying on to pull them in.

That is to say that could argue that, but then I'd be a hypocrite. Most of my packages don't, and I rely on failed rebuilds and namcap to alert me to this. tongue


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

#6 2014-06-13 16:52:37

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Review my edited diffpac PKGBUILD

How about this one:

# Maintainer: Boris Staletic <boris.staletic@gmail.com>
pkgname=diffpac-git
pkgver=20140613
pkgrel=2
pkgdesc="Stand alone replacemnet for pacdiffviewer"
arch=('i686' 'x86_64')
makedepends=('git')
depends=('awk')
optdepends=('colordiff: colorized diff output')
_gitroot='git://github.com/bruenig/diffpac.git'
_gitname='diffpac'
provides=('diffpac')
conflicts=('diffpac')
package() {
    mkdir -p "$srcdir/src"
    cd "$srcdir/src"
    if [ -d "$srcdir/src/$_gitname" ] ; then
        cd $_gitname && git pull origin
    else
        git clone "$_gitroot"
        cd $_gitname
    fi
    mkdir -p "$pkgdir/usr/bin"
    install -m 755 diffpac "$pkgdir/usr/bin/diffpac"
}

No dependancies due to all of dependacies being either in base-devel, base or owned by a package like systemd or pacman.
Since I have no info about previous maintainer I have no contributor tag, and have no idea what the licence is.
Wiki says pkgver for git packages should be a function like:

pkgver(){
  cd "$srcdir/repo"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

But this way makepkg says pkgver is empty.

Offline

#7 2014-06-13 17:04:05

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Review my edited diffpac PKGBUILD

That's because you're still doing the git clone manually. Don't do that.

Offline

#8 2014-06-13 17:07:34

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Review my edited diffpac PKGBUILD

I've got to ask. How not to clone git manually?

Offline

#9 2014-06-13 17:09:00

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Review my edited diffpac PKGBUILD

It's all in that link.

Offline

#10 2014-06-13 18:43:06

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Review my edited diffpac PKGBUILD

I figured out the pkgver. What should I do about licence?

Offline

#11 2014-06-13 22:40:01

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Review my edited diffpac PKGBUILD

If there is none, I usually just put 'unknown'.

Offline

#12 2014-06-13 22:43:16

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Review my edited diffpac PKGBUILD

WorMzy wrote:

You don't have to include deps that are already satisfied by another program, though.

I could argue that this would cause problems if the dependencies you omit for this reason are later dropped by the package you were relying on to pull them in.

Yep, there are packagers in Arch that think that way as well. In the absence of a strong policy either way, it's pretty much a style question.

Offline

#13 2014-06-13 22:46:55

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

Re: Review my edited diffpac PKGBUILD

The diffpac you're pulling from github is licensed under GPL3: https://github.com/bruenig/diffpac/blob … diffpac#L3


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

#14 2014-06-14 06:34:41

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Review my edited diffpac PKGBUILD

Thanks WorMzy, I looked everywhere but in the script.

Offline

#15 2016-02-13 10:55:25

beroal
Member
From: Ukraine
Registered: 2009-06-07
Posts: 325
Website

Re: Review my edited diffpac PKGBUILD

bstaletic, do you plan to upload "diffpac" to AUR?


we are not condemned to write ugly code

Offline

#16 2016-02-17 13:00:38

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Review my edited diffpac PKGBUILD

Beroal,

I could. I just though noone used it and let it end up in the aur archive. My main distro is not arch any more too.

My main concern is about me really being able to stay up to date with Arch's packaging system.

Offline

#17 2016-03-17 07:48:15

beroal
Member
From: Ukraine
Registered: 2009-06-07
Posts: 325
Website

Re: Review my edited diffpac PKGBUILD

Okay, I've uploaded "diffpac-git" to AUR.


we are not condemned to write ugly code

Offline

Board footer

Powered by FluxBB