mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 11:09:19 +02:00
* rpm updates
This commit is contained in:
parent
168ccf83c3
commit
896f306291
16
Makefile
16
Makefile
@ -2223,7 +2223,14 @@ ifdef inUnix
|
|||||||
ifneq ($(wildcard $(CVSINSTALL)/fpc.spec),)
|
ifneq ($(wildcard $(CVSINSTALL)/fpc.spec),)
|
||||||
.PHONY: rpmcopy rpm
|
.PHONY: rpmcopy rpm
|
||||||
RPMFPCVERSION:=$(shell grep '^Version:' $(CVSINSTALL)/fpc.spec | awk '{ print $$2 }')
|
RPMFPCVERSION:=$(shell grep '^Version:' $(CVSINSTALL)/fpc.spec | awk '{ print $$2 }')
|
||||||
|
RPMBUILD=$(shell which rpmbuild)
|
||||||
|
ifeq ($(RPMBUILD),)
|
||||||
|
RPMBUILD=rpm
|
||||||
|
endif
|
||||||
REDHATDIR=/usr/src/redhat
|
REDHATDIR=/usr/src/redhat
|
||||||
|
ifeq ($(wildcard REDHATDIR),)
|
||||||
|
REDHATDIR=/usr/src/rpm
|
||||||
|
endif
|
||||||
RPMSOURCESDIR:=$(REDHATDIR)/SOURCES
|
RPMSOURCESDIR:=$(REDHATDIR)/SOURCES
|
||||||
RPMSPECDIR:=$(REDHATDIR)/SPECS
|
RPMSPECDIR:=$(REDHATDIR)/SPECS
|
||||||
RPMSRCDIR:=$(RPMSOURCESDIR)/fpc
|
RPMSRCDIR:=$(RPMSOURCESDIR)/fpc
|
||||||
@ -2233,6 +2240,9 @@ rpmcopy: distclean
|
|||||||
install -d $(RPMSOURCESDIR)
|
install -d $(RPMSOURCESDIR)
|
||||||
rm -rf $(RPMSRCDIR)
|
rm -rf $(RPMSRCDIR)
|
||||||
cp $(CVSINSTALL)/fpc.spec $(RPMSPECDIR)/fpc-$(RPMFPCVERSION).spec
|
cp $(CVSINSTALL)/fpc.spec $(RPMSPECDIR)/fpc-$(RPMFPCVERSION).spec
|
||||||
|
ifndef NODOCS
|
||||||
|
cat $(CVSINSTALL)/fpcdoc.spec >> $(RPMSPECDIR)/fpc-$(RPMFPCVERSION).spec
|
||||||
|
endif
|
||||||
install -d $(RPMSRCDIR)
|
install -d $(RPMSRCDIR)
|
||||||
$(COPYTREE) compiler $(RPMSRCDIR)
|
$(COPYTREE) compiler $(RPMSRCDIR)
|
||||||
$(COPYTREE) rtl $(RPMSRCDIR)
|
$(COPYTREE) rtl $(RPMSRCDIR)
|
||||||
@ -2244,10 +2254,14 @@ rpmcopy: distclean
|
|||||||
$(COPYTREE) Makefile* $(RPMSRCDIR)
|
$(COPYTREE) Makefile* $(RPMSRCDIR)
|
||||||
$(COPYTREE) $(CVSINSTALL)/man $(RPMSRCDIR)
|
$(COPYTREE) $(CVSINSTALL)/man $(RPMSRCDIR)
|
||||||
$(COPYTREE) $(CVSINSTALL)/doc $(RPMSRCDIR)
|
$(COPYTREE) $(CVSINSTALL)/doc $(RPMSRCDIR)
|
||||||
|
$(COPY) $(CVSINSTALL)/smart_strip.sh $(RPMSRCDIR)
|
||||||
|
chmod +x $(RPMSRCDIR)/smart_strip.sh
|
||||||
|
ifndef NODOCS
|
||||||
$(COPYTREE) docs $(RPMSRCDIR)
|
$(COPYTREE) docs $(RPMSRCDIR)
|
||||||
|
endif
|
||||||
find $(RPMSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
|
find $(RPMSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
|
||||||
cd $(RPMSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-$(RPMFPCVERSION)-src.tar.gz
|
cd $(RPMSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-$(RPMFPCVERSION)-src.tar.gz
|
||||||
rpm: checkfpcdir rpmcopy
|
rpm: checkfpcdir rpmcopy
|
||||||
cd $(RPMSPECDIR) ; rpm --nodeps -ba fpc-$(RPMFPCVERSION).spec
|
cd $(RPMSPECDIR) ; $(RPMBUILD) --nodeps -ba fpc-$(RPMFPCVERSION).spec
|
||||||
endif # spec found
|
endif # spec found
|
||||||
endif
|
endif
|
||||||
|
18
Makefile.fpc
18
Makefile.fpc
@ -591,7 +591,16 @@ ifneq ($(wildcard $(CVSINSTALL)/fpc.spec),)
|
|||||||
|
|
||||||
RPMFPCVERSION:=$(shell grep '^Version:' $(CVSINSTALL)/fpc.spec | awk '{ print $$2 }')
|
RPMFPCVERSION:=$(shell grep '^Version:' $(CVSINSTALL)/fpc.spec | awk '{ print $$2 }')
|
||||||
|
|
||||||
|
# Only the recent rpms have rpmbuild
|
||||||
|
RPMBUILD=$(shell which rpmbuild)
|
||||||
|
ifeq ($(RPMBUILD),)
|
||||||
|
RPMBUILD=rpm
|
||||||
|
endif
|
||||||
REDHATDIR=/usr/src/redhat
|
REDHATDIR=/usr/src/redhat
|
||||||
|
# Debian has /usr/src/rpm
|
||||||
|
ifeq ($(wildcard REDHATDIR),)
|
||||||
|
REDHATDIR=/usr/src/rpm
|
||||||
|
endif
|
||||||
RPMSOURCESDIR:=$(REDHATDIR)/SOURCES
|
RPMSOURCESDIR:=$(REDHATDIR)/SOURCES
|
||||||
RPMSPECDIR:=$(REDHATDIR)/SPECS
|
RPMSPECDIR:=$(REDHATDIR)/SPECS
|
||||||
RPMSRCDIR:=$(RPMSOURCESDIR)/fpc
|
RPMSRCDIR:=$(RPMSOURCESDIR)/fpc
|
||||||
@ -602,6 +611,9 @@ rpmcopy: distclean
|
|||||||
# fpc.rpm
|
# fpc.rpm
|
||||||
rm -rf $(RPMSRCDIR)
|
rm -rf $(RPMSRCDIR)
|
||||||
cp $(CVSINSTALL)/fpc.spec $(RPMSPECDIR)/fpc-$(RPMFPCVERSION).spec
|
cp $(CVSINSTALL)/fpc.spec $(RPMSPECDIR)/fpc-$(RPMFPCVERSION).spec
|
||||||
|
ifndef NODOCS
|
||||||
|
cat $(CVSINSTALL)/fpcdoc.spec >> $(RPMSPECDIR)/fpc-$(RPMFPCVERSION).spec
|
||||||
|
endif
|
||||||
install -d $(RPMSRCDIR)
|
install -d $(RPMSRCDIR)
|
||||||
$(COPYTREE) compiler $(RPMSRCDIR)
|
$(COPYTREE) compiler $(RPMSRCDIR)
|
||||||
$(COPYTREE) rtl $(RPMSRCDIR)
|
$(COPYTREE) rtl $(RPMSRCDIR)
|
||||||
@ -613,12 +625,16 @@ rpmcopy: distclean
|
|||||||
$(COPYTREE) Makefile* $(RPMSRCDIR)
|
$(COPYTREE) Makefile* $(RPMSRCDIR)
|
||||||
$(COPYTREE) $(CVSINSTALL)/man $(RPMSRCDIR)
|
$(COPYTREE) $(CVSINSTALL)/man $(RPMSRCDIR)
|
||||||
$(COPYTREE) $(CVSINSTALL)/doc $(RPMSRCDIR)
|
$(COPYTREE) $(CVSINSTALL)/doc $(RPMSRCDIR)
|
||||||
|
$(COPY) $(CVSINSTALL)/smart_strip.sh $(RPMSRCDIR)
|
||||||
|
chmod +x $(RPMSRCDIR)/smart_strip.sh
|
||||||
|
ifndef NODOCS
|
||||||
$(COPYTREE) docs $(RPMSRCDIR)
|
$(COPYTREE) docs $(RPMSRCDIR)
|
||||||
|
endif
|
||||||
find $(RPMSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
|
find $(RPMSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
|
||||||
cd $(RPMSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-$(RPMFPCVERSION)-src.tar.gz
|
cd $(RPMSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-$(RPMFPCVERSION)-src.tar.gz
|
||||||
|
|
||||||
rpm: checkfpcdir rpmcopy
|
rpm: checkfpcdir rpmcopy
|
||||||
cd $(RPMSPECDIR) ; rpm --nodeps -ba fpc-$(RPMFPCVERSION).spec
|
cd $(RPMSPECDIR) ; $(RPMBUILD) --nodeps -ba fpc-$(RPMFPCVERSION).spec
|
||||||
|
|
||||||
endif # spec found
|
endif # spec found
|
||||||
|
|
||||||
|
@ -21,6 +21,10 @@ BuildRequires: fpc
|
|||||||
%define buildlibdir %{buildroot}%{_libdir}
|
%define buildlibdir %{buildroot}%{_libdir}
|
||||||
%define buildexampledir %{buildroot}%{exampledir}
|
%define buildexampledir %{buildroot}%{exampledir}
|
||||||
|
|
||||||
|
# The normal redhat rpm scripts does not recognize properly, what files to strip
|
||||||
|
# Hook our own strip command
|
||||||
|
%define __strip %{buildroot}/smart_strip.sh
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit
|
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit
|
||||||
@ -47,7 +51,9 @@ NEWFPDOC=`pwd`/utils/fpdoc/fpdoc
|
|||||||
make fcl_smart FPC=${NEWPP}
|
make fcl_smart FPC=${NEWPP}
|
||||||
make packages_extra_smart FPC=${NEWPP}
|
make packages_extra_smart FPC=${NEWPP}
|
||||||
make utils_all FPC=${NEWPP}
|
make utils_all FPC=${NEWPP}
|
||||||
|
if [ -z ${NODOCS} ]; then
|
||||||
make -C docs pdf FPDOC=${NEWFPDOC}
|
make -C docs pdf FPDOC=${NEWFPDOC}
|
||||||
|
fi
|
||||||
|
|
||||||
%install
|
%install
|
||||||
if [ %{buildroot} != "/" ]; then
|
if [ %{buildroot} != "/" ]; then
|
||||||
@ -67,11 +73,18 @@ INSTALLOPTS="FPC=${NEWPP} INSTALL_PREFIX=%{buildroot}/usr INSTALL_LIBDIR=%{build
|
|||||||
make doc_install ${INSTALLOPTS}
|
make doc_install ${INSTALLOPTS}
|
||||||
make man_install ${INSTALLOPTS} INSTALL_PREFIX=%{buildmandir}
|
make man_install ${INSTALLOPTS} INSTALL_PREFIX=%{buildmandir}
|
||||||
|
|
||||||
|
if [ -z ${NODOCS} ]; then
|
||||||
make -C docs pdfinstall DOCINSTALLDIR=%{builddocdir}
|
make -C docs pdfinstall DOCINSTALLDIR=%{builddocdir}
|
||||||
|
fi
|
||||||
|
|
||||||
# create link
|
# create link
|
||||||
ln -sf %{fpcdir}/ppc386 %{buildroot}%{_bindir}/ppc386
|
ln -sf %{fpcdir}/ppc386 %{buildroot}%{_bindir}/ppc386
|
||||||
|
|
||||||
|
# Workaround:
|
||||||
|
# newer rpm versions do not allow garbage
|
||||||
|
# delete lexyacc
|
||||||
|
rm -rf %{buildroot}/usr/lib/fpc/lexyacc
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
make compiler_clean
|
make compiler_clean
|
||||||
@ -86,8 +99,8 @@ if [ %{buildroot} != "/" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Create config
|
# Create a version independent config
|
||||||
%{fpcdir}/samplecfg %{fpcdir}
|
%{fpcdir}/samplecfg %{_libdir}/fpc/\$version
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
@ -98,24 +111,3 @@ fi
|
|||||||
%doc %{docdir}/faq*
|
%doc %{docdir}/faq*
|
||||||
%doc %{exampledir}/*
|
%doc %{exampledir}/*
|
||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# fpc-docs.rpm
|
|
||||||
#
|
|
||||||
|
|
||||||
%package docs
|
|
||||||
Group: Development/Languages
|
|
||||||
Summary: Free Pascal Compiler - Documentation
|
|
||||||
%description docs
|
|
||||||
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit
|
|
||||||
Pascal Compiler. It comes with fully TP 7.0 compatible run-time library.
|
|
||||||
Some extensions are added to the language, like function overloading. Shared
|
|
||||||
libraries can be linked. Basic Delphi support is already implemented (classes,
|
|
||||||
exceptions,ansistrings,RTTI). This package contains commandline compiler and
|
|
||||||
utils. Provided units are the runtime library (RTL), free component library
|
|
||||||
(FCL), gtk,ncurses,zlib, mysql,postgres,ibase bindings.
|
|
||||||
This package contains the documentation in PDF format
|
|
||||||
|
|
||||||
%files docs
|
|
||||||
%defattr(-, root, root)
|
|
||||||
%doc %{docdir}/*.pdf
|
|
||||||
|
21
install/fpcdoc.spec
Normal file
21
install/fpcdoc.spec
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
###############################################################################
|
||||||
|
# fpc-docs.rpm
|
||||||
|
#
|
||||||
|
# Note: This file will be attached to the fpc.spec
|
||||||
|
|
||||||
|
%package docs
|
||||||
|
Group: Development/Languages
|
||||||
|
Summary: Free Pascal Compiler - Documentation
|
||||||
|
%description docs
|
||||||
|
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit
|
||||||
|
Pascal Compiler. It comes with fully TP 7.0 compatible run-time library.
|
||||||
|
Some extensions are added to the language, like function overloading. Shared
|
||||||
|
libraries can be linked. Basic Delphi support is already implemented (classes,
|
||||||
|
exceptions,ansistrings,RTTI). This package contains commandline compiler and
|
||||||
|
utils. Provided units are the runtime library (RTL), free component library
|
||||||
|
(FCL), gtk,ncurses,zlib, mysql,postgres,ibase bindings.
|
||||||
|
This package contains the documentation in PDF format
|
||||||
|
|
||||||
|
%files docs
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%doc %{docdir}/*.pdf
|
18
install/smart_strip.sh
Normal file
18
install/smart_strip.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Wrapper for the strip command
|
||||||
|
#
|
||||||
|
# The redhat rpm scripts try to strip files, that can't be stripped.
|
||||||
|
# This wrapper simply skips some files.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
Params=$@
|
||||||
|
# The last parameter is the file
|
||||||
|
for p in $Params; do
|
||||||
|
File=$p
|
||||||
|
done
|
||||||
|
echo $File | grep -q '\bpalmos\b' || strip $Params
|
||||||
|
|
||||||
|
# end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user