New rpm.make, some config improvements

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@8521 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2001-01-08 21:45:31 +00:00
parent 0672daf693
commit 3c479f0fed
13 changed files with 651 additions and 165 deletions

View file

@ -1,3 +1,23 @@
2001-01-08 Adam Fedor <fedor@gnu.org>
* GNUmakefile.in (MAKE_FILES): Add rpm.make and template.spec.in
* rules.make: Include rpm.make
* rpm.make: New file
* template.spec.in: New file.
* config.make.in: Set CONFIG_SYSTEM_INCL to CPPFLAGS (since most
CPPFLAGS are really include directives).
* brain.make (SYSTEM_INCLUDES): Include CONFIG_SYSTEM_INCL.
This makes sure these includes can be overriden in GNUmakefiles
* config_thread.m: Include impl of NXConstantString for shared libobjc
that doesn't include it.
* configure.in: Check for alternate shared libobjc library also.
Compile config_thread.m as objective-c program.
Set enable-ffcall to be yes by default (unless libs aren't installed).
* Version: New file.
2001-01-03 Adam Fedor <fedor@gnu.org>
* configure.in: Change test for objc forwarding hook to match gcc

2
Documentation/.cvsignore Normal file
View file

@ -0,0 +1,2 @@
GNUmakefile

View file

@ -71,7 +71,8 @@ MAKE_FILES = aggregate.make application.make bundle.make service.make \
target.make tool.make ctool.make test-library.make names.make \
objc.make test-application.make test-tool.make subproject.make \
palette.make gswapp.make gswbundle.make woapp.make wobundle.make \
documentation.make MediaBook.func executable.template framework.make
documentation.make MediaBook.func executable.template framework.make \
rpm.make template.spec.in
all: generated-files which_lib$(EXEEXT)

9
Version Normal file
View file

@ -0,0 +1,9 @@
# This file is included in various Makefile's to get version information.
# Compatible with Bourne shell syntax, so it can included there too.
# The version number of this release.
MAKE_MAJOR_VERSION=0
MAKE_MINOR_VERSION=6
MAKE_SUBMINOR_VERSION=7
GNUSTEP_MAKE_VERSION=${MAKE_MAJOR_VERSION}.${MAKE_MINOR_VERSION}.${MAKE_SUBMINOR_VERSION}

View file

@ -227,7 +227,7 @@ ifeq ($(GUI_BACKEND_LIB),w32)
BACKEND_LIBS = -lMBKit
endif
SYSTEM_INCLUDES =
SYSTEM_INCLUDES = $(CONFIG_SYSTEM_INCL)
SYSTEM_LDFLAGS =
SYSTEM_LIB_DIR =
SYSTEM_LIBS =
@ -236,7 +236,7 @@ SYSTEM_LIBS =
# then add X headers and libraries
#
ifeq ($(GUI_BACKEND_LIB),xdps)
SYSTEM_INCLUDES = $(GRAPHIC_CFLAGS)
SYSTEM_INCLUDES = $(CONFIG_SYSTEM_INCL) $(GRAPHIC_CFLAGS)
SYSTEM_LDFLAGS =
SYSTEM_LIB_DIR = $(GRAPHIC_LFLAGS)
SYSTEM_LIBS = -ldpstk -ldps -lpsres -lXt $(X_PRE_LIBS) $(GRAPHIC_LIBS)
@ -247,14 +247,14 @@ endif
# then add X headers and libraries
#
ifeq ($(GUI_BACKEND_LIB),xraw)
SYSTEM_INCLUDES = $(GRAPHIC_CFLAGS)
SYSTEM_INCLUDES = $(CONFIG_SYSTEM_INCL) $(GRAPHIC_CFLAGS)
SYSTEM_LDFLAGS =
SYSTEM_LIB_DIR = $(GRAPHIC_LFLAGS)
SYSTEM_LIBS = $(GRAPHIC_LIBS)
endif
ifeq ($(GUI_BACKEND_LIB),xgps)
SYSTEM_INCLUDES = $(GRAPHIC_CFLAGS)
SYSTEM_INCLUDES = $(CONFIG_SYSTEM_INCL) $(GRAPHIC_CFLAGS)
SYSTEM_LDFLAGS =
SYSTEM_LIB_DIR = $(GRAPHIC_LFLAGS)
SYSTEM_LIBS = $(GRAPHIC_LIBS)
@ -265,7 +265,7 @@ endif
# then add Win32 headers and libraries
#
ifeq ($(GUI_BACKEND_LIB),w32)
SYSTEM_INCLUDES =
SYSTEM_INCLUDES = $(CONFIG_SYSTEM_INCL)
SYSTEM_LDFLAGS =
SYSTEM_LIB_DIR =
SYSTEM_LIBS = -ltiff -lwsock32 -ladvapi32 -lcomctl32 -luser32 \

View file

@ -26,7 +26,7 @@
#
CC = @CC@
OPTFLAG = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS = @FORCE_CPPFLAGS@
EXEEXT = @EXEEXT@
OEXT = .o
@ -83,6 +83,7 @@ GRAPHIC_LFLAGS=@GRAPHIC_LFLAGS@
X_PRE_LIBS=@X_PRE_LIBS@
# Any user specified libs, like thread libraries
CONFIG_SYSTEM_INCL = @CPPFLAGS@
CONFIG_SYSTEM_LIBS = @LIBS@
CONFIG_SYSTEM_DEFS = @SYSTEM_DEFS@ @DPS_DEFINE@

View file

@ -1,5 +1,10 @@
/* Test whether Objective-C runtime was compiled with thread support */
/* Dummy NXConstantString impl for so libobjc that doesn't include it */
#include <objc/NXConstStr.h>
@implementation NXConstantString
@end
/* From thr.c */
extern int __objc_init_thread_system(void);

305
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -205,6 +205,14 @@ fi
#--------------------------------------------------------------------
CFLAGS=`echo $CFLAGS | sed -e 's/-g //'`
# CPPFLAGS are used throughout for additional includes, which eventually
# goes in the SYSTEM_CONFIG_INCL variable. If someone really wants to
# set CPPFLAGS, set FORCE_CPPFLAGS instead (see config.make.in)
if test "$FORCE_CPPFLAGS" = ""; then
FORCE_CPPFLAGS=
fi
AC_SUBST(FORCE_CPPFLAGS)
#--------------------------------------------------------------------
# Miscellaneous headers (for make programs only)
#--------------------------------------------------------------------
@ -449,7 +457,8 @@ if test -f $GNUSTEP_SYSTEM_ROOT/Headers/objc/objc.h; then
clean_target_os=`$srcdir/clean_os.sh $target_os`
clean_target_cpu=`$srcdir/clean_cpu.sh $target_cpu`
obj_dir=$clean_target_cpu/$clean_target_os/$ac_cv_library_combo
if test -f $GNUSTEP_SYSTEM_ROOT/Libraries/$obj_dir/libobjc.a; then
if test -f $GNUSTEP_SYSTEM_ROOT/Libraries/$obj_dir/libobjc.a \
-o -f $GNUSTEP_SYSTEM_ROOT/Libraries/$obj_dir/libobjc.so; then
gs_cv_objc_libdir=$GNUSTEP_SYSTEM_ROOT/Libraries/$obj_dir
else
gs_cv_objc_libdir=NONE
@ -470,6 +479,8 @@ case "${target_os}" in
extra_LIBS="-lposix4"
;;
esac
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -x objective-c"
saved_LIBS="$LIBS"
objc_thread_lib=""
if test $host_os = linux-gnu; then
@ -496,6 +507,7 @@ else
objc_threaded="", objc_threaded="-lthread")
fi
LIBS="$saved_LIBS"
CFLAGS="$saved_CFLAGS"
if test x"$objc_threaded" = x""; then
AC_MSG_RESULT(no)
else
@ -507,13 +519,14 @@ AC_SUBST(ac_cv_objc_threaded)
#--------------------------------------------------------------------
# Check for FFI interface libraries for invocations
# We enable ffcall by default now.
#--------------------------------------------------------------------
AC_ARG_ENABLE(libffi,
[ --enable-libffi Enable use of libffi library],,
enable_libffi=no)
AC_ARG_ENABLE(ffcall,
[ --enable-ffcall Enable use of ffcall library],,
enable_ffcall=no)
enable_ffcall=yes)
AC_CHECK_HEADER(ffi.h, , enable_libffi=no)
@ -555,7 +568,7 @@ AC_ARG_WITH(openssl-library,
[ --with-openssl-library=PATH library path for openssl libraries],
openssl_libdir="$withval", openssl_libdir="no")
cppflags_temp=$CFLAGS
cppflags_temp=$CPPFLAGS
libs_temp=$LIBS
if test "$openssl_incdir" != "no"; then
@ -673,17 +686,21 @@ fi
#--------------------------------------------------------------------
# Record the version
#--------------------------------------------------------------------
. Version
if test -f "../Version"; then
. ../Version
fi
DATE=`date +"%Y%m%d"`
AC_SUBST(GNUSTEP_VERSION)
AC_SUBST(GNUSTEP_MAJOR_VERSION)
AC_SUBST(GNUSTEP_MINOR_VERSION)
AC_SUBST(DATE)
#--------------------------------------------------------------------
# Produce the output files
#--------------------------------------------------------------------
AC_OUTPUT(config.h config.make openapp debugapp which_lib.pl opentool
executable.template GNUmakefile GNUstep.sh GNUstep.csh
executable.template GNUmakefile GNUstep.sh GNUstep.csh gnustep-make.spec
Documentation/GNUmakefile,
chmod a+x openapp debugapp which_lib.pl opentool executable.template)

View file

@ -1,8 +1,9 @@
# This package is not relocatable
%define ver 0.6.5
%define date 20000217
%define ver @GNUSTEP_VERSION@
%define date @DATE@
%define prefix /usr
%define gsr %{prefix}/GNUstep
%define gir %{prefix}/GNUstep
%define gsr %{prefix}/GNUstep/System
%define libcombo gnu-gnu-gnu-xgps
Name: gnustep-make
Version: %{ver}
@ -11,9 +12,9 @@ Source: ftp://ftp.gnustep.org/pub/gnustep/core/gstep-make-%{ver}.tar.gz
Copyright: GPL
Group: System Environment/Base
Summary: GNUstep Makefile package
Packager: Christopher Seawood <cls@seawood.org>
Distribution: Seawood's Random RPMS (%{_buildsym})
Vendor: The Seawood Project
Packager: Adam Fedor <fedor@gnu.org>
Distribution: The GNUstep Project Presents (%{_buildsym})
Vendor: The GNUstep Project
URL: http://www.gnustep.org/
BuildRoot: /var/tmp/build-%{name}
Conflicts: gnustep-core
@ -40,15 +41,14 @@ Library combo is %{libcombo}.
%prep
%setup -q -n gstep-%{ver}/make
%patch -p2 -b .nodupsh
%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{gsr} --with-library-combo=%{libcombo}
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{gir} --with-library-combo=%{libcombo}
make
%install
rm -rf $RPM_BUILD_ROOT
make install GNUSTEP_INSTALLATION_DIR=${RPM_BUILD_ROOT}%{gsr}
make install prefix=${RPM_BUILD_ROOT}%{gsr}
tmp1=`./config.guess`
tmp2=`./cpu.sh $tmp1`
@ -84,6 +84,7 @@ cat > filelist.rpm.in << EOF
%config /etc/profile.d/GNUstep.sh
%endif
%dir %{gir}
%dir %{gsr}
%dir %{gsr}/share
%dir %{gsr}/Apps
@ -91,11 +92,18 @@ cat > filelist.rpm.in << EOF
%dir %{gsr}/Makefiles/GSARCH
%dir %{gsr}/Makefiles/GSARCH/GSOS
%dir %{gsr}/Library
%dir %{gsr}/Library/info
%dir %{gsr}/Library/Colors
%dir %{gsr}/Library/PostScript
%dir %{gsr}/Library/Services
%dir %{gsr}/Library/man
%dir %{gsr}/Documentation/Developer
%dir %{gsr}/Documentation/User
%dir %{gsr}/Documentation/info
%dir %{gsr}/Documentation/man
%dir %{gsr}/Tools
%dir %{gir}/Local
%dir %{gir}/Local/Users
%dir %{gir}/Local/Users/Administrator
%dir %{gir}/Network
%{gsr}/Makefiles/config*
%{gsr}/Makefiles/*.csh
@ -116,6 +124,7 @@ cat > filelist-devel.rpm.in << EOF
%{gsr}/Makefiles/*.func
%{gsr}/Makefiles/*.make
%{gsr}/Makefiles/*.template
%{gsr}/Makefiles/*.in
%{gsr}/Makefiles/install-sh
%{gsr}/Makefiles/mkinstalldirs

380
rpm.make Normal file
View file

@ -0,0 +1,380 @@
#
# rpm.make
#
# Makefile rules to build a RPM spec files and RPM packages
#
# Copyright (C) 2000 Free Software Foundation, Inc.
#
# Author: Adam Fedor <fedor@gnu.org>
#
# This file is part of the GNUstep Makefile Package.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# You should have received a copy of the GNU General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# rpm puts all tools, bundles, applications, subprojects, libraries, etc
# specified in the GNUmakefile into a single rpm. There aren't any provisions
# for putting separate apps/tools/etc in separate rpms (other than putting
# them in separate dirs).
#
# Common variables (Recommend you set all these):
# PACKAGE_NAME - Name of the rpm package (REQUIRED)
# PACKAGE_DOCS - Docs that go in /usr/doc
# VERSION - Version (defaults to 1.0.0)
# GNUSTEP_INSTALLATION_DIR - Installation dir (defaults to Local root).
# PACKAGE_SOURCE - Source file location
# PACKAGE_COPYRIGHT - Copyright (GPL, etc)
# PACKAGE_SUMMARY - Summary information
# PACKAGE_DESCRIPTION - Package description
# PACKAGER - Pacakger information
# PACKAGE_URL - URL information
# PACKAGE_SUMMARY_DEVEL - Summary information for devel package
# PACKAGE_DESCRIPTION_DEVEL - Devel package description
#
# RPM Specific variables (only needed in for unusual packaging requirements):
# RPM_RELEASE - Release version
# RPM_GROUP - Group information
# RPM_DIST - Distributor information
# RPM_VENDOR - Vendor information
# RPM_CONFLICTS - Conflicting packages
# RPM_REQUIRES - Required packages
# RPM_SETUP - Additional setup instructions
# RPM_CONFIGURE - Additional configuration (including configure script)
# RPM_ADDITIONAL_INSTALL- Additional install instructions
# RPM_POST - Post instalation instructions
# RPM_PREUNINSTALL - Preuninstall instructions
# RPM_POSTUNINSTALL - Postuninstall instructions
# RPM_FILELIST - Additional files to include in filelist
# RPM_FILELIST_DEVEL - Additional files to include in filelist-devel
# RPM_DIRLIST - Additional directories owned by package
# RPM_DIRLIST_DEVEL - Additional directories owned by package
# RPM_CONFLICTS_DEVEL - Conflicting packages for devel package
# RPM_REQUIRES_DEVEL - Required packages for devel package
#
# Current Limitations:
# - Not much configurability, such as, say, making debug=yes or different
# libcombo's, although that stuff should be common throughout rpms anyway
# - Naming information (e.g. shared vs dll vs static library names) are
# locked in the spec file. Need to figure out how to insert those variables
# into the spec file.
# - No architecture specific configurability (aka with libs)
# prevent multiple inclusions
ifeq ($(RPM_MAKE_LOADED),)
RPM_MAKE_LOADED=yes
# Default variable settings
DATE=`date +"%Y%m%d"`
ifeq ($(RPM_RELEASE),)
RPM_RELEASE = 1
endif
ifeq ($(PACKAGE_SOURCE),)
PACKAGE_SOURCE = ftp://ftp.gnustep.org/pub/gnustep/$(PACKAGE_NAME)-$(VERSION).tar.gz
endif
ifeq ($(PACKAGE_COPYRIGHT),)
PACKAGE_COPYRIGHT = GPL
endif
ifeq ($(RPM_GROUP),)
RPM_GROUP = Unknown/Unknown
endif
ifeq ($(PACKAGE_SUMMARY),)
PACKAGE_SUMMARY = $(PACKAGE_NAME) package
endif
ifeq ($(PACKAGE_DESCRIPTION),)
PACKAGE_DESCRIPTION = Fill in a description here\n
endif
ifeq ($(PACKAGER),)
PACKAGER = Mr. GNUstep \<gnustep@gnustep.org\>
endif
ifeq ($(RPM_DIST),)
RPM_DIST = GNUstep Project Presents
endif
ifeq ($(RPM_VENDOR),)
RPM_VENDOR = The GNUstep Project
endif
ifeq ($(PACKAGE_URL),)
PACKAGE_URL = http://www.gnustep.org/
endif
ifeq ($(RPM_CONFLICTS),)
RPM_CONFLICTS =
endif
ifeq ($(RPM_REQUIRES),)
RPM_REQUIRES =
endif
#
# Internal targets
#
SPECNAME=$(PACKAGE_NAME).spec
FLIST=./filelist.rpm.in
FDLIST=./filelist-devel.rpm.in
GID = $(GNUSTEP_INSTALLATION_DIR)
GDIR_APPS = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_APPS))
GDIR_TOOLS = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_TOOLS))
GDIR_SERVICES = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_SERVICES))
GDIR_WOAPPS = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_WOAPPS))
GDIR_HEADERS = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_HEADERS))
GDIR_BUNDLES = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_BUNDLES))
GDIR_FRAMEWORKS = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_FRAMEWORKS))
GDIR_FRAMEWORKS_HEADERS = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_FRAMEWORKS_HEADERS))
GDIR_FRAMEWORKS_LIBRARIES_ROOT = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_FRAMEWORKS_LIBRARIES_ROOT))
GDIR_PALETTES = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_PALETTES))
GDIR_LIBRARIES_ROOT = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_LIBRARIES_ROOT))
GDIR_RESOURCES = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_RESOURCES))
GDIR_JAVA = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_JAVA))
GDIR_DOCUMENTATION = $(subst $(GNUSTEP_INSTALLATION_DIR),,$(GNUSTEP_DOCUMENTATION))
# FIXME: This isn't right. Need to do this for each word in the variable
_RPM_DOC_INSTALL_DIR="$($(DOCUMENT_NAME)_DOC_INSTALL_DIR)"
specfile: $(SPECNAME)
filelist-in:
if [ "$(dir $(FLIST))" = "./" ]; then \
rm -f $(FLIST) $(FDLIST); \
echo "%defattr (-, bin, bin)" > $(FLIST); \
echo "%defattr (-, bin, bin)" > $(FDLIST); \
fi
if [ "$(PACKAGE_DOCS)" != "" ]; then \
echo "%doc $(PACKAGE_DOCS)" >> $(FLIST); \
fi
if [ '$(RPM_DIRLIST)' != "" ]; then \
printf "$(RPM_DIRLIST)" >> $(FLIST); \
fi
if [ '$(RPM_DIRLIST_DEVEL)' != "" ]; then \
printf "$(RPM_DIRLIST_DEVEL)" >> $(FDLIST); \
fi
names="__dummy__"; \
if [ "$(APP_NAME)" != "" ]; then names="$(APP_NAME)"; fi; \
if [ "$$names" != "__dummy__" ]; then \
for file in $$names; do \
echo "%dir %{gsr}$(GDIR_APPS)/$$file.app" >> $(FLIST); \
echo "%{gsr}$(GDIR_APPS)/$$file.app/*" >> $(FLIST); \
done; \
fi
names="__dummy__"; \
if [ "$(BUNDLE_NAME)" != "" ]; then names="$(BUNDLE_NAME)"; fi; \
if [ "$$names" != "__dummy__" ]; then \
for file in $$names; do \
echo "%dir %{gsr}$(GDIR_BUNDLES)/$$file.bundle" >> $(FLIST); \
echo "%{gsr}$(GDIR_BUNDLES)/$$file.bundle/*" >> $(FLIST); \
done; \
fi
names="__dummy__"; \
if [ "$(DOCUMENT_NAME)" != "" ]; then names="$(DOCUMENT_NAME)"; fi; \
if [ "$$names" != "__dummy__" ]; then \
for file in $$names; do \
echo "%dir %{gsr}$(GDIR_DOCUMENTATION)/$(_RPM_DOC_INSTALL_DIR)" >> $(FLIST); \
done; \
fi
names="__dummy__"; \
if [ "$(FRAMEWORK_NAME)" != "" ]; then names="$(FRAMEWORK_NAME)"; fi; \
if [ "$$names" != "__dummy__" ]; then \
for file in $$names; do \
$(MAKE) -f $(MAKEFILE_NAME) INTERNAL_framework_NAME=$$file framework-filelist-in; \
done; \
fi
names="__dummy__"; \
if [ "$(LIBRARY_NAME)" != "" ]; then names="$(LIBRARY_NAME)"; fi; \
if [ "$$names" != "__dummy__" ]; then \
for file in $$names; do \
$(MAKE) -f $(MAKEFILE_NAME) INTERNAL_library_NAME=$$file library-filelist-in; \
done; \
fi
names="__dummy__"; \
if [ "$(PALETTE_NAME)" != "" ]; then names="$(PALETTE_NAME)"; fi; \
if [ "$$names" != "__dummy__" ]; then \
for file in $$names; do \
echo "%dir %{gsr}$(GDIR_PALETTES)/$$file.palette" >> $(FLIST); \
echo "%{gsr}$(GDIR_PALETTES)/$$file.palette/*" >> $(FLIST); \
done; \
fi
names="__dummy__"; \
if [ "$(TOOL_NAME)" != "" ]; then names="$(TOOL_NAME)"; fi; \
if [ "$$names" != "__dummy__" ]; then \
for file in $$names; do \
echo "%{gsr}$(GDIR_TOOLS)/$$file" >> $(FLIST); \
echo "%{gsr}$(GDIR_TOOLS)/GSARCH/GSOS/%{libcombo}/$$file" >> $(FLIST); \
done; \
fi
if [ "$(CTOOL_NAME)" != "" ]; then names="$(CTOOL_NAME)"; fi; \
if [ "$$names" != "__dummy__" ]; then \
for file in $$names; do \
echo "%{gsr}$(GDIR_TOOLS)/$$file" >> $(FLIST); \
echo "%{gsr}$(GDIR_TOOLS)/GSARCH/GSOS/$$file" >> $(FLIST); \
done; \
fi
if [ "$(SUBPROJECTS)" != "" ]; then names="$(SUBPROJECTS)"; fi; \
if [ "$$names" != "__dummy__" ]; then \
for dir in $$names; do \
mf=$(MAKEFILE_NAME); \
if [ ! -f $$dir/$$mf -a -f $$dir/Makefile ]; then \
mf=Makefile; \
echo "WARNING: No $(MAKEFILE_NAME) found for subproject $$f; using 'Makefile'"; \
fi; \
if $(MAKE) -C $$dir -f $$mf FLIST="../$(FLIST)" FDLIST="../$(FDLIST)" filelist-in; then \
:; else exit $$?; \
fi; \
done; \
fi
if [ '$(RPM_FILELIST)' != "" ]; then \
printf "$(RPM_FILELIST)" >> $(FLIST); \
fi
if [ '$(RPM_FILELIST_DEVEL)' != "" ]; then \
printf "$(RPM_FILELIST_DEVEL)" >> $(FDLIST); \
fi
%.spec: filelist-in
rm -f rpmspec.sed
rm -f $@
echo "s/@PACKAGE_NAME@/$(PACKAGE_NAME)/" > rpmspec.sed
echo "s/@VERSION@/$(VERSION)/" >> rpmspec.sed
echo "s/@DATE@/$(DATE)/" >> rpmspec.sed
echo "s,@GID@,$(GID)," >> rpmspec.sed
echo "s/@LIBRARY_COMBO@/$(LIBRARY_COMBO)/" >> rpmspec.sed
echo "s/@RPM_RELEASE@/$(RPM_RELEASE)/" >> rpmspec.sed
echo "s,@PACKAGE_SOURCE@,$(PACKAGE_SOURCE)," >> rpmspec.sed
echo "s/@PACKAGE_COPYRIGHT@/$(PACKAGE_COPYRIGHT)/" >> rpmspec.sed
echo "s,@RPM_GROUP@,$(RPM_GROUP)," >> rpmspec.sed
echo "s/@PACKAGE_SUMMARY@/$(PACKAGE_SUMMARY)/" >> rpmspec.sed
echo "s/@PACKAGER@/$(PACKAGER)/" >> rpmspec.sed
echo "s/@RPM_DIST@/$(RPM_DIST)/" >> rpmspec.sed
echo "s/@RPM_VENDOR@/$(RPM_VENDOR)/" >> rpmspec.sed
echo "s,@PACKAGE_URL@,$(PACKAGE_URL)," >> rpmspec.sed
echo "s/@RPM_CONFLICTS@/$(RPM_CONFLICTS)/" >> rpmspec.sed
echo "s/@RPM_REQUIRES@/$(RPM_REQUIRES)/" >> rpmspec.sed
if [ "$(RPM_CONFLICTS)" != "" ]; then \
echo "Conflicts: $(RPM_CONFLICTS)" >> $@; \
fi
if [ "$(RPM_REQUIRES)" != "" ]; then \
echo "Requires: $(RPM_REQUIRES)" >> $@; \
fi
sed -f rpmspec.sed < $(GNUSTEP_MAKEFILES)/template.spec.in > $@
echo "" >> $@
echo "" >> $@
echo "%description" >> $@
printf "$(PACKAGE_DESCRIPTION)" >> $@
echo "Library combo is %{libcombo}." >> $@
echo "%{_buildblurb}" >> $@
if [ "`grep Headers filelist-devel.rpm.in`" != "" ]; then \
echo "" >> $@; \
echo "%package devel" >> $@; \
echo "Summary: $(PACKAGE_SUMMARY_DEVEL)" >> $@; \
echo "Group: Developement/Libraries" >> $@; \
echo "Requires: %{name} = %{ver} $(RPM_REQUIRES_DEVEL)" >> $@; \
if [ "$(RPM_CONFLICTS_DEVEL)" != "" ]; then \
echo "Conflicts: $(RPM_CONFLICTS_DEVEL)" >> $@; \
fi; \
echo "" >> $@; \
echo "%description devel" >> $@; \
printf "$(PACKAGE_DESCRIPTION_DEVEL)" >> $@; \
echo "Library combo is %{libcombo}." >> $@; \
echo "%{_buildblurb}" >> $@; \
fi
echo "" >> $@
echo "%prep" >> $@
echo "%setup -q $(RPM_SETUP)" >> $@
echo "" >> $@
echo "%build" >> $@
echo 'if [ -z "$$GNUSTEP_SYSTEM_ROOT" ]; then' >> $@
echo " . %{gsr}/Makefiles/GNUstep.sh " >> $@
echo "fi" >> $@
echo 'CFLAGS="$$RPM_OPT_FLAGS" $(RPM_CONFIGURE)' >> $@
echo "make" >> $@
echo "" >> $@
echo "%install" >> $@
echo 'rm -rf $$RPM_BUILD_ROOT' >> $@
echo 'if [ -z "$$GNUSTEP_SYSTEM_ROOT" ]; then' >> $@
echo " . %{gsr}/Makefiles/GNUstep.sh " >> $@
echo "fi" >> $@
echo 'make install GNUSTEP_INSTALLATION_DIR=$${RPM_BUILD_ROOT}%{gsr}' >> $@
echo "$(RPM_ADDITIONAL_INSTALL)" >> $@
echo "" >> $@
echo "cat > filelist.rpm.in << EOF" >> $@
cat filelist.rpm.in >> $@
echo "EOF" >> $@
if [ "`grep Headers filelist-devel.rpm.in`" != "" ]; then \
echo "" >> $@; \
echo "cat > filelist-devel.rpm.in << EOF" >> $@; \
cat filelist-devel.rpm.in >> $@; \
echo "EOF" >> $@; \
fi
echo "" >> $@
echo 'sed -e "s|GSARCH|$${GNUSTEP_HOST_CPU}|" -e "s|GSOS|$${GNUSTEP_HOST_OS}|" < filelist.rpm.in > filelist.rpm' >> $@
if [ "`grep Headers filelist-devel.rpm.in`" != "" ]; then \
echo 'sed -e "s|GSARCH|$${GNUSTEP_HOST_CPU}|" -e "s|GSOS|$${GNUSTEP_HOST_OS}|" < filelist-devel.rpm.in > filelist-devel.rpm' >> $@; \
fi
echo "" >> $@
if [ "$(RPM_POST)" != "" ]; then \
echo "%post" >> $@; \
echo "$(RPM_POST)" >> $@; \
echo "" >> $@; \
fi
if [ "$(RPM_PREUNINSTALL)" != "" ]; then \
echo "%preun" >> $@; \
echo "$(RPM_PREUNINSTALL)" >> $@; \
echo "" >> $@; \
fi
if [ "$(RPM_POSTUNINSTALL)" != "" ]; then \
echo "%postun" >> $@; \
echo "$(RPM_POSTUNINSTALL)" >> $@; \
echo "" >> $@; \
fi
echo "%clean" >> $@
echo 'rm -rf $$RPM_BUILD_ROOT' >> $@
echo "" >> $@
echo "%files -f filelist.rpm" >> $@
if [ "`grep Headers filelist-devel.rpm.in`" != "" ]; then \
echo "%files -f filelist-devel.rpm devel" >> $@; \
fi
echo "" >> $@
echo "%changelog" >> $@
echo "$(RPM_CHANGELOG)" >> $@
rm -f $(FLIST) $(FDLIST) rpmspec.sed
#
# Just playing around with these for now
#
snapshot-dist:
SNAPSHOT_DIR=`basename `pwd``; \
cd ..; \
mv $SNAPSHOT_DIR $(PACKAGE_NAME)-$(VERSION); \
tar --gzip -cf $(PACKAGE_NAME)-$(VERSION).tar.gz $(PACKAGE_NAME)-$(VERSION); \
mv $(PACKAGE_NAME)-$(VERSION) $SNAPSHOT_DIR
#
# Targets that get invoked the second time around, when INTERNAL_obj_NAME
# has been defined and the appropriate variables have been defined in
# other .make files
#
library-filelist-in:
echo "%{gsr}/Libraries/GSARCH/GSOS/%{libcombo}/$(LIBRARY_FILE).*" >> $(FLIST)
if [ "$(LIBRARY_FILE)" != "$(VERSION_LIBRARY_FILE)" ]; then \
echo "%{gsr}/Libraries/GSARCH/GSOS/%{libcombo}/$(LIBRARY_FILE)" >> $(FDLIST); \
fi
RPM_HEAD_DIR="$($(INTERNAL_library_NAME)_HEADER_FILES_INSTALL_DIR)"; \
echo "%{gsr}/Headers$(RPM_HEAD_DIR)" >> $(FDLIST)
framework-filelist-in:
echo "%dir %{gsr}$(GDIR_FRAMEWORKS)/$(FRAMEWORK_DIR_NAME) >> $(FLIST)
echo "%{gsr}/$(GDIR_FRAMEWORKS)/$(FRAMEWORK_DIR_NAME)/*" >> $(FLIST)
echo "%{gsr}/$(GDIR_FRAMEWORKS_LIBRARIES_ROOT)" >> $(FLIST)
echo "%{gsr}/$(GDIR_FRAMEWORKS_HEADERS)" >> $(FLIST)
endif
# rpm.make loaded
## Local variables:
## mode: makefile
## End:

View file

@ -435,6 +435,11 @@ $(GNUSTEP_OBJ_DIR):
@$(MKDIRS) ./$(GNUSTEP_OBJ_DIR)
endif
#
# Rules for building RPM packages
#
include $(GNUSTEP_MAKEFILES)/rpm.make
endif
# rules.make loaded

18
template.spec.in Normal file
View file

@ -0,0 +1,18 @@
# Generated automatically by GNUstep
%define ver @VERSION@
%define date @DATE@
%define gsr @GID@
%define libcombo @LIBRARY_COMBO@
Name: @PACKAGE_NAME@
Version: %{ver}
Release: @RPM_RELEASE@
Prefix: %{gsr}
Source: @PACKAGE_SOURCE@
Copyright: @PACKAGE_COPYRIGHT@
Group: @RPM_GROUP@
Summary: @PACKAGE_SUMMARY@
Packager: @PACKAGER@
Distribution: @RPM_DIST@
Vendor: @RPM_VENDOR@
URL: @PACKAGE_URL@
BuildRoot: /var/tmp/build-%{name}