You are not logged in.

#1 2009-10-26 00:23:18

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

[SOLVED] Is there any way for a PKGBUILD to read the complete options?

How can the build() function of a PKGBUILD read the complete options array, as set by both /etc/make.conf AND the PKGBUILD itself?

I tried to read $options, but that only worked when I set options in the PKGBUILD; it did not show anything from /etc/makepkg.conf

I need this because the package I am writing a PKGBUILD for has configure options that enable/disable documentation and optimization and such, which should be controlled by the 'docs', 'debug', and 'strip' options.

Last edited by Ranguvar (2009-10-26 01:20:46)

Offline

#2 2009-10-26 01:10:34

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

Re: [SOLVED] Is there any way for a PKGBUILD to read the complete options?

makepkg uses this function:

##
# Checks to see if options are present in makepkg.conf or PKGBUILD;
# PKGBUILD options always take precedence.
#
#  usage : check_option( $option )
# return : y - enabled
#          n - disabled
#          ? - not found
##
check_option() {

Offline

#3 2009-10-26 01:20:16

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: [SOLVED] Is there any way for a PKGBUILD to read the complete options?

Excellent big_smile

Perhaps this should be in some documentation?  It seems quite useful.

Offline

Board footer

Powered by FluxBB