You are not logged in.

#1 2012-09-19 10:33:30

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

makepkg, is it iteractive?

Hello,

I'm trying to learn to make a PKGBUILD which should offer some options during the process.
I rose some doubt because the additional function, to ask questions, will fail to add required dependencies.
I don't know much about makepkg, then I don't see way to execute the question out of the build() function. Isn't it allowed?


do it good first, it will be faster than do it twice the saint wink

Offline

#2 2012-09-19 10:58:37

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: makepkg, is it iteractive?

No.

Offline

#3 2012-09-19 11:24:05

Awebb
Member
Registered: 2010-05-06
Posts: 6,286

Re: makepkg, is it iteractive?

Let the user edit some local variables in the PKGBUILD before calling makepkg, but only if it is really required.

Offline

#4 2012-09-19 14:09:48

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

Re: makepkg, is it iteractive?

Here is a similar recent thread: https://bbs.archlinux.org/viewtopic.php?id=147203

Offline

#5 2012-09-19 15:15:34

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: makepkg, is it iteractive?

Awebb wrote:

Let the user edit some local variables in the PKGBUILD before calling makepkg, but only if it is really required.

You can even modify the dependency array:

# configuration, enable with "y"
_enable_foo=n
_enable_bar=y
# end configuration

depends=(glibc something)
# add dependencies for configuration
    [ "$_enable_foo" = y ] && depends+=(libfoo)
    if [ "$_enable_bar" = y ]; then
        depends+=(libbar)
    fi
# end additional dependencies

function build() {
    if [] ... fi
    if [] ... fi
    make
}

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#6 2012-09-19 15:33:07

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: makepkg, is it iteractive?

I stand for the dictated general options.
Mostly there should be a PKGBUILD for each of the greater option.
@drcouzelis, thanks for the info.


do it good first, it will be faster than do it twice the saint wink

Offline

#7 2012-09-19 15:36:24

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: makepkg, is it iteractive?

Do something similar to what graysky did with the linux-ck PKGBUILD: Create variables unique to the PKGBUILD, and then place comments at the top describing those variables.  No one should be building from the AUR without reading PKGBUILDs anyway.

Offline

#8 2012-09-20 00:52:58

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: makepkg, is it iteractive?

ANOKNUSA wrote:

Do something similar to what graysky did with the linux-ck PKGBUILD: Create variables unique to the PKGBUILD, and then place comments at the top describing those variables.  No one should be building from the AUR without reading PKGBUILDs anyway.

Added bonus point - you may be able to cause bugs for those using yaourt (which is good because it forces people to THINK when installing). linux-ice and linux-rt-ice do similar.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#9 2012-09-20 05:09:55

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: makepkg, is it iteractive?

Well, the new one should comply the specifications.
Group packages use a iteractivity, doesn't they?


do it good first, it will be faster than do it twice the saint wink

Offline

#10 2012-09-20 05:22:31

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: makepkg, is it iteractive?

TheSaint wrote:

Group packages use a iteractivity, doesn't they?

How so? The interactivity is part of pacman, not part of each PKGBUILD.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB