Update to newstyle buildpkg metadata.

Add patch to fix DESTDIR install.
This commit is contained in:
Tom G. Christensen 2008-04-19 19:06:45 +00:00 committed by tgc
parent 7cca167c1b
commit 7a66ae0d26
5 changed files with 96 additions and 69 deletions

View File

@ -1,33 +1,28 @@
#!/bin/bash #!/usr/tgcware/bin/bash
# #
# This is a generic build.sh script # This is a generic build.sh script
# It can be used nearly unmodified with many packages # It can be used nearly unmodified with many packages
# #
# The concept of "method" registering and the logic that implements it was shamelessly # build.sh helper functions
# stolen from jhlj's Compile.sh script :) . ${BUILDPKG_BASE}/scripts/build.sh.functions
# #
###########################################################
# Check the following 4 variables before running the script # Check the following 4 variables before running the script
topdir=patch topdir=patch
version=2.5.4 version=2.5.4
pkgver=2 pkgver=1
source[0]=$topdir-$version.tar.gz source[0]=$topdir-$version.tar.gz
# If there are no patches, simply comment this # If there are no patches, simply comment this
#patch[0]= patch[0]=patch-2.5.4-destdir.patch
# Source function library # Source function library
. ${HOME}/buildpkg/scripts/buildpkg.functions . ${BUILDPKG_BASE}/scripts/buildpkg.functions
# Fill in pkginfo values if necessary # Global settings
# using pkgname,name,pkgcat,pkgvendor & pkgdesc export CPPFLAGS="-I$prefix/include"
name="GNU Patch" export LDFLAGS="-L$prefix/lib -R$prefix/lib"
pkgvendor="http://www.gnu.org" shortroot=1
pkgdesc="Patch - Applies a patch to a file" ac_overrides="ac_cv_path_ed_PROGRAM=/usr/bin/ed"
# Define script functions and register them
METHODS=""
reg() {
METHODS="$METHODS $1"
}
reg prep reg prep
prep() prep()
@ -41,16 +36,23 @@ build()
generic_build generic_build
} }
reg check
check()
{
generic_check
}
reg install reg install
install() install()
{ {
generic_install prefix generic_install DESTDIR
doc README NEWS ChangeLog COPYING
} }
reg pack reg pack
pack() pack()
{ {
generic_pack shortroot generic_pack
} }
reg distclean reg distclean
@ -62,42 +64,4 @@ distclean()
################################################### ###################################################
# No need to look below here # No need to look below here
################################################### ###################################################
build_sh $*
reg all
all()
{
for METHOD in $METHODS
do
case $METHOD in
all*|*clean) ;;
*) $METHOD
;;
esac
done
}
reg
usage() {
echo Usage $0 "{"$(echo $METHODS | tr " " "|")"}"
exit 1
}
OK=0
for METHOD in $*
do
METHOD=" $METHOD *"
if [ "${METHODS%$METHOD}" == "$METHODS" ] ; then
usage
fi
OK=1
done
if [ $OK = 0 ] ; then
usage;
fi
for METHOD in $*
do
( $METHOD )
done

9
patch/meta/pkgdef Normal file
View File

@ -0,0 +1,9 @@
[patch]
pkgname="${pkgprefix}${topdir}"
name="$topdir - GNU patch"
pkgcat="application"
pkgvendor="http://www.fsf.org/software/patch/patch.html"
shortdesc="Applies a patch to a file"
pkgver="$pkgver"
files(-,root,bin)
*

View File

@ -1,11 +0,0 @@
PKG="%%pkgname%%"
NAME="%%name%%"
ARCH="sparc"
VERSION="%%version%%"
CATEGORY="%%pkgcat%%"
VENDOR="%%pkgvendor%%"
EMAIL="Tom G. Christenen - tgc@statsbiblioteket.dk"
PSTAMP="%%pkgver%%"
BASEDIR="%%topinstalldir%%"
CLASSES="none"
DESC="%%pkgdesc%%"

27
patch/meta/relnotes Normal file
View File

@ -0,0 +1,27 @@
PACKAGE DETAILS
---------------
Name: %%PKGNAME%%
Version: %%SOURCE_AND_VER%%
Vendor: %%VENDOR%%
Packager: %%PKGEDBY%%
Source (sha1sum):
%%SOURCE_SHA1SUM%%
BUILD DETAILS
-------------
Compiler:
%%COMPILER%%
Environment:
%%ENVIRONMENT%%
Configure:
%%CONFIGURE%%
KNOWN DEPENDENCIES
------------------
%%DEPENDENCIES%%
ERRORS/MISCELLANEOUS
--------------------

View File

@ -0,0 +1,38 @@
*** patch-2.5.4/Makefile.in.destdir Sat Apr 19 20:52:21 2008
--- patch-2.5.4/Makefile.in Sat Apr 19 20:54:44 2008
***************
*** 41,46 ****
--- 41,48 ----
U = @U@
VERSION = @VERSION@
+ DESTDIR =
+
prefix = @prefix@
exec_prefix = @exec_prefix@
***************
*** 97,107 ****
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
install:: all installdirs
! $(INSTALL_PROGRAM) patch$(EXEEXT) $(bindir)/$(patch_name)$(EXEEXT)
! -$(INSTALL_DATA) $(srcdir)/patch.man $(man1dir)/$(patch_name)$(man1ext)
installdirs::
! $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(man1dir)
install-strip::
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
--- 99,109 ----
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
install:: all installdirs
! $(INSTALL_PROGRAM) patch$(EXEEXT) $(DESTDIR)$(bindir)/$(patch_name)$(EXEEXT)
! -$(INSTALL_DATA) $(srcdir)/patch.man $(DESTDIR)$(man1dir)/$(patch_name)$(man1ext)
installdirs::
! $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
install-strip::
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install