1. Fix bug number 2773 2. Allow make rpm to work as non root user 3. Fix to archive names generated by owar.pas
Colin
diff -uNr fpc/compiler/owar.pas fpc.u/compiler/owar.pas --- fpc/compiler/owar.pas 2004-05-10 20:55:33.000000000 +0100 +++ fpc.u/compiler/owar.pas 2004-05-26 22:38:21.691214455 +0100 @@ -154,7 +154,9 @@ { win32 will change names starting with .\ to ./ when using lfn, corrupting the sort order required for the idata sections. To prevent this strip always the path from the filename. (PFV) } - fn:=SplitFileName(fn)+'/'; + if fn <> '/' then + fn:=SplitFileName(fn); + fn:=fn+'/'; if length(fn)>16 then begin arhdr.name[0]:='/'; diff -uNr fpc/install/fpc.spec fpc.u/install/fpc.spec --- fpc/install/fpc.spec 2004-03-21 22:05:22.000000000 +0000 +++ fpc.u/install/fpc.spec 2004-05-26 22:21:12.759826417 +0100 @@ -29,7 +29,7 @@ # The normal redhat rpm scripts does not recognize properly, what files to strip # Hook our own strip command -%define __strip %{buildroot}/smart_strip.sh +%define __strip %{_builddir}/%{name}-%{version}/smart_strip.sh %description @@ -78,7 +78,7 @@ make demo_install ${INSTALLOPTS} INSTALL_SOURCEDIR=%{buildexampledir} make doc_install ${INSTALLOPTS} - make man_install ${INSTALLOPTS} INSTALL_PREFIX=%{buildmandir} + make man_install ${INSTALLOPTS} INSTALL_MANDIR=%{buildmandir} if [ -z ${NODOCS} ]; then make -C docs pdfinstall DOCINSTALLDIR=%{builddocdir} diff -uNr fpc/Makefile fpc.u/Makefile --- fpc/Makefile 2004-05-26 21:01:14.000000000 +0100 +++ fpc.u/Makefile 2004-05-26 21:59:35.000000000 +0100 @@ -2220,10 +2220,16 @@ ifeq ($(RPMBUILD),) RPMBUILD=$(strip $(wildcard $(addsuffix /rpm,$(SEARCHPATH)))) endif +REDHATDIR=$(shell rpm --eval=%_topdir) +ifeq ($(REDHATDIR),%_topdir) +REDHATDIR= +endif +ifeq ($(REDHATDIR),) REDHATDIR=/usr/src/redhat ifeq ($(wildcard $(REDHATDIR)),) REDHATDIR=/usr/src/rpm endif +endif RPMSOURCESDIR:=$(REDHATDIR)/SOURCES RPMSPECDIR:=$(REDHATDIR)/SPECS RPMSRCDIR:=$(RPMSOURCESDIR)/fpc diff -uNr fpc/Makefile.fpc fpc.u/Makefile.fpc --- fpc/Makefile.fpc 2004-05-26 21:01:14.000000000 +0100 +++ fpc.u/Makefile.fpc 2004-05-26 22:01:19.000000000 +0100 @@ -523,11 +523,17 @@ ifeq ($(RPMBUILD),) RPMBUILD=$(strip $(wildcard $(addsuffix /rpm,$(SEARCHPATH)))) endif +REDHATDIR=$(shell rpm --eval=%_topdir) +ifeq ($(REDHATDIR),%_topdir) +REDHATDIR= +endif +ifeq ($(REDHATDIR),) REDHATDIR=/usr/src/redhat # Debian has /usr/src/rpm ifeq ($(wildcard $(REDHATDIR)),) REDHATDIR=/usr/src/rpm endif +endif RPMSOURCESDIR:=$(REDHATDIR)/SOURCES RPMSPECDIR:=$(REDHATDIR)/SPECS RPMSRCDIR:=$(RPMSOURCESDIR)/fpc