Compare commits

...

16 Commits

Author SHA1 Message Date
Mario Fetka
13eb443a11 DBP Repo 2025-09-14 21:23:42 +02:00
Mario Fetka
17c7e7d975 readd log to file 2025-09-14 21:15:46 +02:00
Mario Fetka
3c40b423d2 no log to file just stdout 2025-09-10 14:39:37 +02:00
Mario Fetka
29fa5a8d0d Correct tgc to dbp 2025-09-07 01:00:50 +02:00
Mario Fetka
a0bb1fff46 correct paths 2025-09-06 22:05:16 +02:00
Mario Fetka
246eae205f Mod for dbpware 2025-09-06 20:36:32 +02:00
Tom G. Christensen
78e516ad61 Add support for lzma compressed tar archives 2019-06-02 09:22:41 +02:00
Tom G. Christensen
3cd10f85d4 Make pkgdef filename a global variable 2019-05-31 10:16:46 +02:00
Tom G. Christensen
7eb78af9ae Update copyright years 2019-05-30 11:16:49 +02:00
Tom G. Christensen
d38443871c Enable passing options to make in generic_build() 2019-05-30 11:12:18 +02:00
Tom G. Christensen
fe7f6cb97e Add support for lz compressed tar archives 2018-04-14 14:08:25 +02:00
Tom G. Christensen
f95e226c80 Update urls in license text 2018-04-09 20:37:52 +02:00
Tom G. Christensen
27e745bc1c Update copyright years 2018-04-09 20:31:40 +02:00
Tom G. Christensen
6e408949ea Make gnu symlink creation work again
Since the default configure_args is now expanded immediately it cannot depend
on variables defined later.
To fix this for users of gnu_link_progs another API change is necessary.

gnu_link_progs is now a private array of programs to link. The
private gnu_link function is renamed do_gnu_link. A new public function
named gnu_link is added which handles populating gnu_link_progs and
modifying configure_args.
2013-10-10 16:16:33 +02:00
Tom G. Christensen
6620dc6854 build.sh.functions: use build_arch in logfile name 2013-09-21 18:11:38 +02:00
Tom G. Christensen
6750c1f90d buildpkg.functions: change how pkgdirdesig and topinstalldir is defined
Instead of defining pkgdirdesig using topinstalldir do it the other way
around.
2013-09-21 11:58:36 +02:00
6 changed files with 80 additions and 63 deletions

View File

@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@@ -1,7 +1,7 @@
# Function library for buildpkg build.sh
# This is only for build.sh helper functions.
# Copyright (C) 2003 Jens Henrik Leonhard Jensen
# Copyright (C) 2003-2013 Tom G. Christensen <tgc@jupiterrise.com>
# Copyright (C) 2003-2019 Tom G. Christensen <tgc@jupiterrise.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Tom G. Christensen <tgc@jupiterrise.com>.
@@ -88,7 +88,7 @@ timestamp()
log_start()
{
local func=$1
build_sh_logfile=${topdir}-${version}_${pkgver}-${os}-${arch}-${func}-$(timestamp).log
build_sh_logfile=${topdir}-${version}_${pkgver}-${os}-${build_arch}-${func}-$(timestamp).log
if [ $autolog -eq 1 ]; then
if [ -z "$(${__expr} "$nolog" : ".*\($func\)")" ]; then

View File

@@ -1,5 +1,5 @@
# Global function library for buildpkg
# Copyright (C) 2003-2013 Tom G. Christensen <tgc@jupiterrise.com>
# Copyright (C) 2003-2019 Tom G. Christensen <tgc@jupiterrise.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Tom G. Christensen <tgc@jupiterrise.com>.
@@ -67,7 +67,8 @@ topsrcdir=$topdir-$version # it may be necessary to override this
srcfiles=$buildpkgbase/srcfiles
topinstalldir=/usr/tgcware
pkgdirdesig=dbpware # topinstalldir suffix
topinstalldir=/usr/$pkgdirdesig
prefix=$topinstalldir
metainstalldir=$topinstalldir
@@ -96,12 +97,10 @@ _os=$(${__uname} -sr|${__sed} -e 's/ //g' -e 's/\.//g'|${__tr} '[A-Z]' '[a-z]')
# pkg information.
# The following 3 vars can be used when constructing pkg metadata
# Override as necessary.
pkgprefix=SB
pkgprefix=DBP
pkgname=$pkgprefix$topdir # overriding this will be common
name=$topdir # as will this ditto
pkgdirdesig=${topinstalldir##/*/} # topinstalldir suffix
# Functionality controls
symlinkman=0 # Don't replace .so linking with symlinks pr. default
symlinkman_verbose=0 # Be quiet
@@ -153,6 +152,8 @@ patch_prefix="-p1"
gnu_prefix=g
# GNU dir
_gnudir=gnu
# Add --program-prefix to configure if gnu_link is requested?
gnu_configure=1
# Distfiles should be named like this
# <name>-<version>-<pkgver>.sb-<os>-<cpu>-<pkgdirdesig>
@@ -397,7 +398,7 @@ get_files()
# unpack(): Unpack source
# params: $1 = source number (arrayindex)
# It will detect filetype and unpack
# .tar, .tgz, .gz, .bz2, .xz, .zip and .Z supported
# .tar, .tgz, .gz, .bz2, .xz, .lzma, .zip and .Z supported
unpack()
{
local source=${source[$1]}
@@ -434,7 +435,8 @@ unpack()
'bz2') ${__bzip2} -dc $absfile | ${__tar} -xf -;;
'Z') ${__gzip} -dc $absfile | ${__tar} -xf -;;
'tgz') ${__gzip} -dc $absfile | ${__tar} -xf -;;
'xz') ${__xz} -dc $absfile | ${__tar} -xf -;;
'xz'|'lzma') ${__xz} -dc $absfile | ${__tar} -xf -;;
'lz') ${__lzip} -dc $absfile | ${__tar} -xf -;;
'zip') ${__unzip} -q $absfile;;
*) error $E_BAD_COMPRESS unpack
esac
@@ -765,25 +767,39 @@ check_changelog()
fi
}
# gnu_link: Setup links in $prefix/$_gnudir
# do_gnu_link: Create symlinks in $prefix/$_gnudir
# params: list of programs to link
# For each program given, create a symlink from $prefix/${_bindir}/program to
# $prefix/gnu with the first character stripped from the name
gnu_link()
do_gnu_link()
{
local program
${__mkdir} -p ${stagedir}${prefix}/$_gnudir
setdir ${stagedir}${prefix}/$_gnudir
cd ${stagedir}${prefix}/$_gnudir
for program in $@
do
local dest=${program:1}
echo "Linking $prefix/${_bindir}/$program to $prefix/$_gnudir/$dest"
${__ln_s} ../${_bindir}/$program ${program:1}
${__ln_s} ../${_bindir}/$program ${dest}
done
}
# gnu_link: Prepare for gnu symlink setup
# params: list of programs to link
# Each param is added to the internal gnu_link_progs array
# It will also add --program-prefix=$gnu_prefix to configure_args if requested
gnu_link()
{
local item
for item in "$@"
do
gnu_link_progs+=($item)
done
[ $gnu_configure -eq 1 ] && configure_args=(--program-prefix=$gnu_prefix "${configure_args[@]}")
}
#####################################################
# Define generic functions for different build stages
#####################################################
@@ -845,7 +861,7 @@ generic_build()
if [ $? -ne 0 ]; then
error $E_BAD_CONFIG generic_build
fi
${__make} $(_upls $make_build_target)
${__make} ${make_build_opts} $(_upls $make_build_target)
if [ $? -ne 0 ]; then
error $E_BAD_MAKE generic_build
fi
@@ -935,13 +951,11 @@ generic_install()
if [ $autonuke -eq 1 ]; then
do_autonuke
fi
if [ -n "$gnu_link_progs" ]; then
# There are programs that should be linked to $prefix/$_gnudir
# If there are programs that should be linked to $prefix/$_gnudir
local prog
for prog in $gnu_link_progs; do
gnu_link ${gnu_prefix}${prog}
for prog in "${gnu_link_progs[@]}"; do
do_gnu_link ${gnu_prefix}${prog}
done
fi
}
# generic_install_perl(): Install already built perl module
@@ -993,7 +1007,7 @@ generic_install_perl()
# but that will break buildpkg since they are processed
# later and the names thus change leaving pkgdef broken
$d =~ /\Q$_\E/ && return
for qw|/etc /usr/tgcware/bin /usr/tgcware/share|;
for qw|/etc /usr/dbpware/bin /usr/dbpware/share|;
$dirs[@dirs] = $_;
}

View File

@@ -1,6 +1,6 @@
# Function library for buildpkg framework
# It adds support for creating Irix packages in 'inst' format
# Copyright (C) 2003-2013 Tom G. Christensen <tgc@jupiterrise.com>
# Copyright (C) 2003-2019 Tom G. Christensen <tgc@jupiterrise.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Tom G. Christensen <tgc@jupiterrise.com>.
@@ -128,7 +128,7 @@ declare -a opfiles # Files that should have an ops associated
declare -a opscript # Ops to associate with opfiles
#override defaults
pkgprefix=tgc_
pkgprefix=dbp_
pkgname=$pkgprefix$topdir
os=irix`${__uname} -r`
@@ -142,7 +142,7 @@ META_CLEAN="$topdir.spec $topdir.idb files.tmp ${depends##*/}_auto ${depends##*/
# Host specific configuration
[ -r $buildpkgscripts/config.$($HOSTNAME -s).irix ] && . $buildpkgscripts/config.$($HOSTNAME -s).irix
distfile='$topdir-$version-$pkgver.tgc-$os-$cpu-$pkgdirdesig.tardist'
distfile='$topdir-$version-$pkgver.dbp-$os-$cpu-$pkgdirdesig.tardist'
#####################################################
# Internal helper functions
@@ -1187,7 +1187,7 @@ dep_pkg_name()
}
# extract_deps: Given a subsystem it will extract the dependencies
# params: $1 = subsystem name (like tgc_xxx.sw.lib)
# params: $1 = subsystem name (like dbp_xxx.sw.lib)
# It goes through the idb file and finds all the files
# associated with a given subsystem. It will then compute
# the dependencies and return the package names for the dependencies.

View File

@@ -1,6 +1,6 @@
# Function library for buildpkg framework
# It adds support for creating Solaris packages in 'sysv' format
# Copyright (C) 2003-2013 Tom G. Christensen <tgc@jupiterrise.com>
# Copyright (C) 2003-2019 Tom G. Christensen <tgc@jupiterrise.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Tom G. Christensen <tgc@jupiterrise.com>.
@@ -46,8 +46,8 @@ pkgvendor="http://change/me/please"
pkgdesc="mumble mubmle... hmm someone forgot to fill this out!"
# vendor & contact information
pkgedby="Tom G. Christensen"
email=swpkg@jupiterrise.com
pkgedby="Mario Fetka"
email=mario.fetka@disconnected-by-peer.at
# Set some helper vars that describes arch and OS version
arch=`uname -p`
@@ -56,7 +56,7 @@ os=sunos`${__uname} -r`
gnu_os_ver=$(${__uname} -r | ${__sed} -e 's/^5/2/')
# By default, the build_arch is the same as arch, alternatives are sparc64 and
# x86_64. It should be set to either when building for tgcware64.
# x86_64. It should be set to either when building for dbpware64.
build_arch=$arch
# Default pkginfo.in file
@@ -96,7 +96,7 @@ _mandir=share/man
_infodir=share/info
# Default configure args
configure_args=(${gnu_link_progs:+--program-prefix=$gnu_prefix} --prefix=$prefix --mandir=${prefix}/${_mandir} --infodir=${prefix}/${_infodir})
configure_args=(--prefix=$prefix --mandir=${prefix}/${_mandir} --infodir=${prefix}/${_infodir})
# Host specific configuration
[ -r $buildpkgscripts/config.`hostname`.solaris ] && . $buildpkgscripts/config.`hostname`.solaris
@@ -106,7 +106,13 @@ configure_args=(${gnu_link_progs:+--program-prefix=$gnu_prefix} --prefix=$prefix
# ie: libmad-0.14.2b-1.sb-sol5.8-sparc-local
# We hardquote it so that we can control when we want it
# evaluated (using _upls)
distfile='$secname-$version-$secver.tgc-$os-$build_arch-$pkgdirdesig'
distfile='$secname-$version-$secver.dbp-$os-$build_arch-$pkgdirdesig'
# What pkgdef file to use
pkgdef_file=pkgdef
# Check and see if there is an arch specific pkgdef file
[ -r $metadir/pkgdef.$arch ] && pkgdef_file=pkgdef.$arch
[ -r $metadir/pkgdef.$build_arch ] && pkgdef_file=pkgdef.$build_arch
#####################################################
# "external" functions
@@ -659,7 +665,7 @@ auto_deps()
done >> $metadir/depend.$secname.auto
}
# parse_pkgdef(): Read in $metadir/pkgdef
# parse_pkgdef(): Read in $metadir/$pkgdef_file
# params: none
# This will parse the package descriptions in
# pkgdef that tells us how many packages there
@@ -673,11 +679,6 @@ parse_def()
local legalend=0
local hasaddedpkginfo=0
local condexpr=""
local pkgdef_file=pkgdef
# Check and see if there is an arch specific pkgdef file
[ -r $metadir/pkgdef.$arch ] && pkgdef_file=pkgdef.$arch
[ -r $metadir/pkgdef.$build_arch ] && pkgdef_file=pkgdef.$build_arch
while read line
do

View File

@@ -1,25 +1,26 @@
# Global tool defintions for buildpkg
# Define tool programs in rpm style __ prefixed namespace
__bash=/usr/tgcware/bin/bash
__bash=/usr/dbpware/bin/bash
__strip=/usr/bin/strip
__uname=/usr/bin/uname
__tar=/usr/tgcware/bin/tar # GNU tar v1.14 or better please!
__tar=/usr/dbpware/bin/gtar # GNU tar v1.14 or better please!
__vtar=/usr/bin/tar # vendor supplied tar
__bzip2=/usr/tgcware/bin/bzip2
__gzip=/usr/tgcware/bin/gzip
__xz=/usr/tgcware/bin/xz
__patch=/usr/tgcware/bin/patch # GNU patch 2.5 or better please!
__bzip2=/usr/dbpware/bin/bzip2
__gzip=/usr/dbpware/bin/gzip
__xz=/usr/dbpware/bin/xz
__lzip=/usr/dbpware/bin/lzip
__patch=/usr/dbpware/bin/gpatch # GNU patch 2.5 or better please!
__rm=/usr/bin/rm
__rmdir=/usr/bin/rmdir
__mkdir=/usr/bin/mkdir
__make=/usr/tgcware/bin/make # GNU make 3.80 or better please!
__make=/usr/dbpware/bin/gmake # GNU make 3.80 or better please!
__find=/usr/bin/find # vendor supplied find, GNU find will require changes to the script
__xargs=/usr/bin/xargs
__cat=/usr/bin/cat
__awk=/usr/bin/nawk # This must be nawk or GNU awk - plain /usr/bin/awk will *not* work
__sed=/usr/bin/sed
__gsed=/usr/tgcware/bin/sed
__gsed=/usr/dbpware/bin/gsed
__sort=/usr/bin/sort
__cut=/usr/bin/cut
__ls=/usr/bin/ls
@@ -27,11 +28,11 @@ __expr=/usr/bin/expr
__mv=/usr/bin/mv
__mkdir=/usr/bin/mkdir
__cp=/usr/bin/cp
__gcp=/usr/tgcware/bin/cp
__gcp=/usr/dbpware/bin/gcp
__tee=/bin/tee
__grep=/bin/grep
__egrep=/bin/egrep
__ggrep=/usr/tgcware/bin/grep # GNU grep
__ggrep=/usr/dbpware/bin/ggrep # GNU grep
__uniq=/bin/uniq
__basename=/bin/basename
__dirname=/bin/dirname
@@ -39,17 +40,18 @@ __tr=/bin/tr
__file=/usr/bin/file # Used by do_strip()
__ln=/usr/bin/ln
__ln_s="/usr/bin/ln -s"
__install=/usr/tgcware/bin/install # BSD compatible install - usually GNU install
__install=/usr/dbpware/bin/ginstall # BSD compatible install - usually GNU install
__compress=/usr/bsd/compress
__pack=/usr/bin/pack
__sha1sum=/usr/tgcware/bin/sha1sum
__unzip=/usr/tgcware/bin/unzip
__sha1sum=/usr/dbpware/bin/gsha1sum
__unzip=/usr/dbpware/bin/unzip
__head=/usr/bin/head # Must support -n
__perl=/usr/tgcware/bin/perl
__readlink=/usr/tgcware/bin/readlink
__perl=/usr/dbpware/bin/perl
__readlink=/usr/dbpware/bin/greadlink
__ldd=/usr/bin/ldd
__curl=/usr/tgcware/bin/curl
__curl=/usr/dbpware/bin/curl
# Groff stuff for manpages
__nroff=/usr/tgcware/bin/nroff
#__nroff=/usr/dbpware/bin/nroff
__nroff=/usr/bin/nroff
NROFFOPTS="-c -mandoc -Tascii -t"