diff --git a/install/fpc-docs.spec b/install/fpc-docs.spec index 8d4057079d..bfaa06687e 100644 --- a/install/fpc-docs.spec +++ b/install/fpc-docs.spec @@ -1,17 +1,16 @@ Name: fpc-docs Version: 1.1 -Release: 1 +Release: 0 Copyright: GPL Group: Development/Languages -Source: fpc-docs-1.1-src.tar.gz +Source: %{name}-%{version}-src.tar.gz Summary: Free Pascal Compiler Documentation Packager: Peter Vreman (peter@freepascal.org) URL: http://www.freepascal.org/ -BuildRoot: /tmp/fpc-docs-build +BuildRoot: %{_tmppath}/fpc-build -%define fpcversion 1.1 -%define fpcdir /usr/lib/fpc/%{fpcversion} -%define docdir /usr/doc/fpc-%{fpcversion} +%define fpcdir %{_libdir}/fpc/%{version} +%define docdir %{_docdir}/fpc-%{version} %define builddocdir %{buildroot}%{docdir} @@ -30,12 +29,18 @@ This package contains the documentation in PDF format make -C docs pdf %install +if [ %{buildroot} != "/" ]; then rm -rf %{buildroot} +fi + make -C docs pdfinstall DOCINSTALLDIR=%{builddocdir} %clean make -C docs clean +if [ %{buildroot} != "/" ]; then rm -rf %{buildroot} +fi %files -/usr +%defattr(-, root, root) +%doc %{docdir}/* diff --git a/install/fpc.spec b/install/fpc.spec index aeb8955d90..1ac69c53b5 100644 --- a/install/fpc.spec +++ b/install/fpc.spec @@ -1,23 +1,25 @@ Name: fpc Version: 1.1 -Release: 1 +Release: 0 ExclusiveArch: i386 i586 i686 Copyright: GPL Group: Development/Languages -Source: fpc-1.1-src.tar.gz +Source: %{name}-%{version}-src.tar.gz Summary: Free Pascal Compiler Packager: Peter Vreman (peter@freepascal.org) URL: http://www.freepascal.org/ -BuildRoot: /tmp/fpc-build +BuildRoot: %{_tmppath}/fpc-build BuildRequires: fpc -%define fpcversion 1.1 -%define fpcdir /usr/lib/fpc/%{fpcversion} -%define docdir /usr/doc/fpc-%{fpcversion} +%define fpcdir %{_libdir}/fpc/%{version} +%define docdir %{_docdir}/fpc-%{version} %define builddocdir %{buildroot}%{docdir} +%define buildmandir %{buildroot}%{_mandir} +%define buildbindir %{buildroot}%{_bindir} +%define buildlibdir %{buildroot}%{_libdir} -%description +%description 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 @@ -33,15 +35,19 @@ utils. Provided units are the runtime library (RTL), free component library NEWPP=`pwd`/compiler/ppc386 make compiler_cycle FPC_VERSION=`ppc386 -iV` make rtl_clean rtl_smart FPC=${NEWPP} - make packages_smart FPC=${NEWPP} + make packages_base_smart FPC=${NEWPP} make fcl_smart FPC=${NEWPP} + make packages_extra_smart FPC=${NEWPP} make utils_all FPC=${NEWPP} %install +if [ %{buildroot} != "/" ]; then rm -rf %{buildroot} - +fi + NEWPP=`pwd`/compiler/ppc386 -INSTALLOPTS="FPC=${NEWPP} INSTALL_PREFIX=%{buildroot}/usr INSTALL_DOCDIR=%{builddocdir}" +INSTALLOPTS="FPC=${NEWPP} INSTALL_PREFIX=%{buildroot}/usr INSTALL_LIBDIR=%{buildlibdir} \ + INSTALL_DOCDIR=%{builddocdir} INSTALL_BINDIR=%{buildbindir}" make compiler_distinstall ${INSTALLOPTS} make rtl_distinstall ${INSTALLOPTS} make packages_distinstall ${INSTALLOPTS} @@ -50,8 +56,12 @@ INSTALLOPTS="FPC=${NEWPP} INSTALL_PREFIX=%{buildroot}/usr INSTALL_DOCDIR=%{build make demo_install ${INSTALLOPTS} INSTALL_SOURCEDIR=%{builddocdir} make doc_install ${INSTALLOPTS} - make man_install ${INSTALLOPTS} - + make man_install ${INSTALLOPTS} INSTALL_PREFIX=%{buildmandir} + + # create link + ln -sf %{fpcdir}/ppc386 %{buildroot}%{_bindir}/ppc386 + + %clean make compiler_clean make rtl_clean @@ -59,20 +69,20 @@ INSTALLOPTS="FPC=${NEWPP} INSTALL_PREFIX=%{buildroot}/usr INSTALL_DOCDIR=%{build make fcl_clean make utils_clean +if [ %{buildroot} != "/" ]; then rm -rf %{buildroot} - +fi + %post -FPCDIR=%{fpcdir} - -# create link -ln -sf $FPCDIR/ppc386 /usr/bin/ppc386 - # Create config -$FPCDIR/samplecfg $FPCDIR +%{fpcdir}/samplecfg %{fpcdir} # update ld.so cache #ldconfig - %files -/usr +%defattr(-, root, root) +%{_bindir}/* +%{fpcdir} +%doc %{docdir}/* +%{_mandir}/*/*