mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 15:49:27 +02:00
* support multiple platforms
This commit is contained in:
parent
3094258825
commit
a75a9bf0c0
@ -4,14 +4,15 @@
|
||||
#
|
||||
# $1 = path to debian files
|
||||
#
|
||||
if [ $# != 1 ]; then
|
||||
echo 'Usage : fixdeb path'
|
||||
if [ $# != 2 ]; then
|
||||
echo 'Usage : fixdeb path ppcbin'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PACKAGEVERSION=`head -n 1 $1/changelog | awk '{ print $2 }' | tr -d '[()]'`
|
||||
FPCVERSION=`echo $PACKAGEVERSION | awk -F '-' '{ print $1 }'`
|
||||
DEBVERSION=`echo $PACKAGEVERSION | awk -F '-' '{ print $2 }'`
|
||||
PPCBIN="$2"
|
||||
|
||||
# Snapshot ?
|
||||
if [ "$DEBVERSION" == "0" ]; then
|
||||
@ -25,9 +26,10 @@ fi
|
||||
echo 'PackageVersion: ' $PACKAGEVERSION
|
||||
echo 'FPCVersion : ' $FPCVERSION
|
||||
echo 'DebVersion : ' $DEBVERSION
|
||||
echo 'PPCBin : ' $PPCBIN
|
||||
|
||||
for i in $1/*.in
|
||||
do
|
||||
j=${i/%.in/}
|
||||
sed -e 's/%{fpcversion}/'$FPCVERSION'/g;s/%{packageversion}/'$PACKAGEVERSION'/g' $i > $j
|
||||
sed -e 's/%{fpcversion}/'$FPCVERSION'/g;s/%{packageversion}/'$PACKAGEVERSION'/g;s/%{ppcbin}/'$PPCBIN'/g' $i > $j
|
||||
done
|
||||
|
@ -10,7 +10,7 @@ update-alternatives \
|
||||
--slave /usr/share/man/man1/fpc.1.gz fpc.1.gz /usr/share/man/man1/fpc.1.gz
|
||||
|
||||
# create link
|
||||
ln -sf $FPCDIR/ppc386 /usr/bin/ppc386
|
||||
ln -sf $FPCDIR/%{ppcbin} /usr/bin/%{ppcbin}
|
||||
|
||||
# Debhelper code
|
||||
#DEBHELPER#
|
||||
|
@ -4,6 +4,36 @@
|
||||
# Documentation type to use pdf/html
|
||||
DOCTYPE=pdf
|
||||
|
||||
# Detect name of new compiler
|
||||
CPU_SOURCE=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
CPU_TARGET=$(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||
ifeq ($(CPU_TARGET),m68k)
|
||||
PPSUF=68k
|
||||
endif
|
||||
ifeq ($(CPU_TARGET),i386)
|
||||
PPSUF=386
|
||||
endif
|
||||
ifeq ($(CPU_TARGET),x86_64)
|
||||
PPSUF=x64
|
||||
endif
|
||||
ifeq ($(CPU_TARGET),powerpc)
|
||||
PPSUF=ppc
|
||||
endif
|
||||
ifeq ($(CPU_TARGET),alpha)
|
||||
PPSUF=axp
|
||||
endif
|
||||
ifeq ($(CPU_TARGET),arm)
|
||||
PPSUF=arm
|
||||
endif
|
||||
|
||||
ifneq ($(CPU_SOURCE),$(CPU_TARGET))
|
||||
PPPRE=ppcross
|
||||
else
|
||||
PPPRE=ppc
|
||||
endif
|
||||
|
||||
PPNEW=$(PPPRE)$(PPSUF)
|
||||
|
||||
# Reset FPC and FPCDIR if it was set
|
||||
FPC=
|
||||
FPCDIR=
|
||||
@ -17,7 +47,7 @@ INSTALL_DIR=$(PWD)/debian/tmp
|
||||
DOC_DIR=$(INSTALL_DIR)/usr/share/doc
|
||||
EXAMPLE_TEMP=$(DOC_DIR)/fpc-$(FPCVERSION)
|
||||
# Get utils
|
||||
NEWPP=$(PWD)/compiler/ppc386
|
||||
NEWPP=$(PWD)/compiler/$(PPNEW)
|
||||
NEWFPDOC=$(PWD)/utils/fpdoc/fpdoc
|
||||
# Create default options
|
||||
BUILDOPTS=PP=$(NEWPP)
|
||||
@ -63,7 +93,7 @@ clean:
|
||||
debian-files: debian-files-stamp
|
||||
debian-files-stamp:
|
||||
@echo "--- Creating debian files"
|
||||
bash debian/fixdeb debian
|
||||
bash debian/fixdeb debian $(PPNEW)
|
||||
|
||||
touch debian-files-stamp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user