You are not logged in.

#1 2008-05-16 20:04:57

LTSmash
Member
From: Aguascalientes - Mexico
Registered: 2008-01-02
Posts: 348
Website

mbfl PKGBUILD not working

I did this PKGBUILD:

# Contributor: LTSmash <lord.ltsmash@gmail.com>
pkgname=mbfl
pkgver=1.1.14
pkgrel=1
pkgdesc="Marco's Bash Functions Library is a library of functions for the GNU bash shell, intended to be sourced by scripts at runtime."
arch=(i686 x86_64)
url="https://gna.org/projects/mbfl/"
license=('LGPL')
depends=(bash)
source=(http://download.gna.org/mbfl/$pkgver/$pkgname'_'$pkgver'_'src.tar.gz)
md5sums=()

build() {
  cd "$srcdir/$pkgname"_"$pkgver"
  ./configure --prefix=/usr
  make all || return 1
  make DESTDIR="$pkgdir" install
}

However I get this output:

checking for a BSD-compatible install... /bin/install -c
checking whether make sets $(MAKE)... yes
checking for bash... /bin/sh
checking for bzip2... /bin/bzip2
checking for cat... /bin/cat
checking for cp... /bin/cp
checking for date... /bin/date
checking for grep... /bin/grep
checking for gawk... /bin/gawk
checking for gzip... /bin/gzip
checking for m4... /usr/bin/m4
checking for makeinfo... /usr/bin/makeinfo
checking for mkdir... /bin/mkdir
checking for rm... /bin/rm
checking for sed... /bin/sed
checking for ln... /bin/ln
checking for tar... /bin/tar
checking for tclsh... /usr/bin/tclsh
checking for develstuff.sh... :
configure: creating ./config.status
config.status: creating mbfl-config
config.status: creating Makefile
ln: creating symbolic link «/usr/bin/mbfl-config»: Permiso denegado
/bin/sh /home/ltsmash/PKGBUILDS/mbfl/src/mbfl_1.1.14/scripts/mbflpp.sh --include=/home/ltsmash/PKGBUILDS/mbfl/src/mbfl_1.1.14/macros --include=/home/ltsmash/PKGBUILDS/mbfl/src/mbfl_1.1.14/modules --library=preprocessor.m4 --define=__PKGDATADIR__=/usr/share/mbfl_1.1.14 --define=__PACKAGE_NAME__=mbfl --define=__PACKAGE_VERSION__=1.1.14 </home/ltsmash/PKGBUILDS/mbfl/src/mbfl_1.1.14/modules/message.sh.m4 >/home/ltsmash/PKGBUILDS/mbfl/src/mbfl_1.1.14/modules/message.sh
/home/ltsmash/PKGBUILDS/mbfl/src/mbfl_1.1.14/scripts/mbflpp.sh: line 43: mbfl-config: command not found
/home/ltsmash/PKGBUILDS/mbfl/src/mbfl_1.1.14/scripts/mbflpp.sh: line 43: : No existe el fichero o el directorio
make: *** [/home/ltsmash/PKGBUILDS/mbfl/src/mbfl_1.1.14/modules/message.sh] Error 1

I know that the problem is because somehow the mbflpp.sh script can't find mbfl-config to execute it.
Here's mbflpp.sh:

#!/bin/bash
# mbflpp.sh --
# 
# Part of: Marco's BASH Functions Library
# Contents: script preprocessor
# Date: Tue Mar 29, 2005
# 
# Abstract
# 
#    Preprocessor for BASH scripts using MBFL.
# 
# Copyright (c) 2005 Marco Maggi
# 
# This is free  software you can redistribute it  and/or modify it under
# the terms of  the GNU General Public License as  published by the Free
# Software Foundation; either  version 2, or (at your  option) any later
# version.
# 
# This  file is  distributed in  the hope  that it  will be  useful, but
# WITHOUT   ANY  WARRANTY;  without   even  the   implied  warranty   of
# MERCHANTABILITY  or FITNESS  FOR A  PARTICULAR PURPOSE.   See  the GNU
# General Public License for more details.
# 
# You  should have received  a copy  of the  GNU General  Public License
# along with this file; see the file COPYING.  If not, write to the Free
# Software Foundation,  Inc., 59  Temple Place -  Suite 330,  Boston, MA
# 02111-1307, USA.
# 

#page
## ------------------------------------------------------------
## MBFL's related options and variables.
## ------------------------------------------------------------

script_PROGNAME=mbflpp.sh
script_VERSION='__PACKAGE_VERSION__'
script_COPYRIGHT_YEARS=2005
script_AUTHOR='Marco Maggi'
script_LICENSE=GPL
script_USAGE="usage: ${script_PROGNAME} [options] <INFILE >OUTFILE"
script_DESCRIPTION='Script preprocessor for MBFL.'

source "${MBFL_LIBRARY:=$(mbfl-config)}"

# keyword default-value brief-option long-option has-argument description
mbfl_declare_option PRESERVE_COMMENTS \
    no "" preserve-comments noarg "do not filter out comments"
mbfl_declare_option ADD_BASH \
    no "" add-bash noarg "add '#!${BASH}' at the beginning"
mbfl_declare_option DEFINE \
    "" "" define witharg "define a new symbols (m4 syntax)"
mbfl_declare_option INCLUDE \
    "" "" include witharg "add a search path for files"
mbfl_declare_option LIBRARY \
    "" "" library witharg "include an M4 library"

mbfl_declare_program m4
mbfl_declare_program grep
mbfl_declare_program sed

#page
## ------------------------------------------------------------
## Global variables.
## ------------------------------------------------------------

hidden_option_DATADIR='__PKGDATADIR__'

declare symbols libraries includes

#page
## ------------------------------------------------------------
## Option update functions.
## ------------------------------------------------------------

function script_option_update_define () {
    symbols="${symbols} --define=${script_option_DEFINE}"
}
function script_option_update_library () {
    libraries="${libraries} ${script_option_LIBRARY}"
}
function script_option_update_include () {
    includes="${includes} --include=${script_option_INCLUDE}"
}

#page
## ------------------------------------------------------------
## Main functions.
## ------------------------------------------------------------

function main () {
    local M4_FLAGS='--prefix-builtins'
    local libfile=${hidden_option_DATADIR}/preprocessor.m4

    
    M4_FLAGS="${M4_FLAGS} ${includes} ${symbols}"
    mbfl_file_is_readable "${libfile}" && M4_FLAGS="${M4_FLAGS} ${libfile}"
    M4_FLAGS="${M4_FLAGS} ${libraries}"    

    if test "${script_option_ADD_BASH}" = "yes"; then
        printf "#!${BASH}\n"
    fi
    if test "${script_option_PRESERVE_COMMENTS}" = "yes"; then
        program_m4 ${M4_FLAGS} -
    else
        program_m4 ${M4_FLAGS} - | filter_drop_comments
    fi
}

#page
## ------------------------------------------------------------
## Stream filters.
## ------------------------------------------------------------

function filter_drop_comments () {
    program_grep --invert-match -e '^[ \t]*#' -e '^$' | \
        program_sed -e 's/^[[:blank:]]\+//'
}

#page
## ------------------------------------------------------------
## Program interfaces.
## ------------------------------------------------------------

function program_m4 () {
    local M4=$(mbfl_program_found m4)
    mbfl_program_exec ${M4} "$@"
}
function program_grep () {
    local GREP=$(mbfl_program_found grep)
    mbfl_program_exec ${GREP} "$@"
}
function program_sed () {
    local SED=$(mbfl_program_found sed)
    mbfl_program_exec ${SED} "$@"
}

#page
## ------------------------------------------------------------
## Let's go.
## ------------------------------------------------------------

mbfl_main

### end of file
# Local Variables:
# mode: sh
# End:

You can see in the 43 line the way it's calling for the other script.

have you got any ideas to fix this?

thanks.


Proud Ex-Arch user.
Still an ArchLinux lover though.

Currently on Kubuntu 9.10

Offline

#2 2008-05-16 21:31:53

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: mbfl PKGBUILD not working

The problem is here:

ln: creating symbolic link «/usr/bin/mbfl-config»: Permiso denegado

(unless "permiso denegado" does not mean "permission denied" smile )
You can't create files, or links, in the running system when building a package. Everything has to happen in $startdir/src or $startdir/pkg.

Offline

#3 2008-05-16 21:37:27

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: mbfl PKGBUILD not working

The makefile does not use DESTDIR, the documentation says to use INSTALL_ROOT to perform that function

Last edited by ghostHack (2008-05-16 21:38:53)

Offline

Board footer

Powered by FluxBB