You are not logged in.

#1 2017-05-25 15:01:22

Michail
Member
From: Moscow, Russia
Registered: 2016-06-23
Posts: 34
Website

Adding a script that is not a part of git repo to a package [SOLVED]

I'm packaging a D language library, and it really could use a '-config' script, like 'python-config' or 'sdl2-config', for use in Makefiles (so there's no need to type include files' and library location manually). I can see a couple of possibilities to do so:

  • write a script-generating function in the PKGBUILD. Lots of 'echo'ing, feels clumsy.

  • make a git repo with the script and include it in the 'source' array. A git repo for a 15-lines long script feels like an overkill.

What is the traditional way of doing this?

Last edited by Michail (2017-05-25 16:19:37)


> Don't get impatient, you cannot solve problems by coding, you can only solve them by thinking.

Offline

#2 2017-05-25 15:06:58

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,784

Re: Adding a script that is not a part of git repo to a package [SOLVED]

Write the script and include it in the git tree so it gets wrapped up in the Tarbel.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2017-05-25 15:12:49

Michail
Member
From: Moscow, Russia
Registered: 2016-06-23
Posts: 34
Website

Re: Adding a script that is not a part of git repo to a package [SOLVED]

ewaller wrote:

Write the script and include it in the git tree so it gets wrapped up in the Tarbel.

I should've mentioned that the git repo is not mine, I can't do anything with it. Otherwise, there would be absolutely no problem.

Last edited by Michail (2017-05-25 15:13:48)


> Don't get impatient, you cannot solve problems by coding, you can only solve them by thinking.

Offline

#4 2017-05-25 15:23:21

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

Re: Adding a script that is not a part of git repo to a package [SOLVED]

He's talking about the git tree of the AUR, where the PKGBUILD is.

Offline

#5 2017-05-25 15:23:41

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Adding a script that is not a part of git repo to a package [SOLVED]

I'm having a bit of trouble understanding the situation, but...

Can't you just create the script (text file) and include it when posting it to the AUR? There's no need to host it yourself on GitHub. For example, the package for "pdftk" has a "Makefile.Arch" file:

https://aur.archlinux.org/packages/pdftk/

https://aur.archlinux.org/cgit/aur.git/ … LD?h=pdftk

https://aur.archlinux.org/cgit/aur.git/tree/?h=pdftk

Offline

#6 2017-05-25 15:34:11

Michail
Member
From: Moscow, Russia
Registered: 2016-06-23
Posts: 34
Website

Re: Adding a script that is not a part of git repo to a package [SOLVED]

Thank you everyone! The question was stupid, but the conversation was very educational. Thank you again for your patience (it's my first time making a package).


> Don't get impatient, you cannot solve problems by coding, you can only solve them by thinking.

Offline

#7 2017-05-25 16:15:37

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Adding a script that is not a part of git repo to a package [SOLVED]

Thank you for contributing! smile

Please "Edit" your original post and add "[SOLVED]" to the title.

Offline

#8 2017-05-26 03:16:41

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Adding a script that is not a part of git repo to a package [SOLVED]

-config scripts are abominations, you should be using the standard pkg-config. wink

Also, file a bugreport/merge request upstream to encourage them to provide their own .pc files for everyone.

Last edited by eschwartz (2017-05-26 03:18:13)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2017-05-26 15:00:50

Michail
Member
From: Moscow, Russia
Registered: 2016-06-23
Posts: 34
Website

Re: Adding a script that is not a part of git repo to a package [SOLVED]

Eschwartz wrote:

-config scripts are abominations, you should be using the standard pkg-config. wink

Also, file a bugreport/merge request upstream to encourage them to provide their own .pc files for everyone.

I somewhat doubt that they'll accept this, even if I supply the file. A pkg-config file in a Dub package would seem out of place. But hey, I'll try.

Edit: actually, nevermind, I'll just add a .pc file to the AUR repo, and not try to get it into the main git repository. The library is not designed with installation without Dub in mind.

Last edited by Michail (2017-05-26 15:08:23)


> Don't get impatient, you cannot solve problems by coding, you can only solve them by thinking.

Offline

#10 2017-05-26 18:32:32

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Adding a script that is not a part of git repo to a package [SOLVED]

Even if they don't accept it, other people who don't use Arch are more likely to find your contributed .pc file in their bugtracker than in the AUR. smile So filing a merge request upstream is still useful.

And it is too bad that it would seem out of place, given that it wouldn't actually be out of place regardless of the common perception.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#11 2017-05-26 19:12:41

Michail
Member
From: Moscow, Russia
Registered: 2016-06-23
Posts: 34
Website

Re: Adding a script that is not a part of git repo to a package [SOLVED]

Well, the problem is that there's no information in the primary repo about installation paths, I had to choose them myself when I was making the package. So, conceivably, an end user can stick the files whereever, and a pkg-config file isn't really a place to look for installation paths. There's just no way to make sure a .pc file is actually relevant (I've added one to the AUR repo, though).


> Don't get impatient, you cannot solve problems by coding, you can only solve them by thinking.

Offline

#12 2017-05-26 20:06:05

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Adding a script that is not a part of git repo to a package [SOLVED]

I see. Maybe you can add an install target to their build system while you are at it.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB