From 7242fb6d64f804a5c32507b638fb470dfcadaba2 Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Tue, 16 Jan 2001 19:25:49 +0000 Subject: [PATCH] New file git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@8629 72102866-910b-0410-8b05-ffd578937521 --- source-distribution.make | 58 +++++++++++++++++++++++++++++++ spec-debug-alone-rules.template | 40 +++++++++++++++++++++ spec-debug-rules.template | 61 +++++++++++++++++++++++++++++++++ spec-rules.template | 39 +++++++++++++++++++++ 4 files changed, 198 insertions(+) create mode 100644 source-distribution.make create mode 100644 spec-debug-alone-rules.template create mode 100644 spec-debug-rules.template create mode 100644 spec-rules.template diff --git a/source-distribution.make b/source-distribution.make new file mode 100644 index 00000000..f0fc4093 --- /dev/null +++ b/source-distribution.make @@ -0,0 +1,58 @@ +# +# source-distribution.make +# +# Makefile rules to build snapshots, source tgz etc +# +# Copyright (C) 2000 Free Software Foundation, Inc. +# +# Author: Adam Fedor +# Author: Nicola Pero +# +# 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. + +# +# Interesting variables to define: +# +# PACKAGE_NAME = gnustep-base +# VERSION = 1.0.0 +# + +# prevent multiple inclusions +ifeq ($(TGZ_MAKE_LOADED),) +TGZ_MAKE_LOADED=yes + +# +# Build a .tgz with the whole directory tree +# Attention - the source tree should be clean ! +# +tgz: + @echo "Generating the .tgz..."; \ + SNAPSHOT_DIR=`basename $$(pwd)`; \ + cd ..; \ + if [ "$$SNAPSHOT_DIR" != "$(PACKAGE_NAME)-$(VERSION)" ]; then \ + mv $$SNAPSHOT_DIR $(PACKAGE_NAME)-$(VERSION); \ + fi; \ + tar cfz $(PACKAGE_NAME)-$(VERSION).tgz $(PACKAGE_NAME)-$(VERSION); \ + if [ "$$SNAPSHOT_DIR" != "$(PACKAGE_NAME)-$(VERSION)" ]; then \ + mv $(PACKAGE_NAME)-$(VERSION) $$SNAPSHOT_DIR; \ + fi; + +targz: + FIXME + +endif +# source-distribution.make loaded + +## Local variables: +## mode: makefile +## End: diff --git a/spec-debug-alone-rules.template b/spec-debug-alone-rules.template new file mode 100644 index 00000000..dcab5c83 --- /dev/null +++ b/spec-debug-alone-rules.template @@ -0,0 +1,40 @@ +# +# Setup sources +# +%prep +%setup -n %{gs_name}-%{gs_version} + +# +# Build commands +# +%build +if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then + . %{gs_root}/Makefiles/GNUstep.sh +fi +# Argh - this doesn't work +CFLAGS=$RPM_OPT_FLAGS +make debug=yes + +# +# Install commands (generate file list too) +# +%install +if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then + . %{gs_root}/Makefiles/GNUstep.sh +fi + +make debug=yes \ + GNUSTEP_INSTALL_BASE=$RPM_BUILD_ROOT \ + GNUSTEP_INSTALLATION_DIR=$RPM_BUILD_ROOT%{gs_install_dir} \ + filelist=yes install + +# +# Clean commands +# +%clean +rm -rf $RPM_BUILD_ROOT + +# +# File list (generated by `%install') +# +%files -f file-list-debug diff --git a/spec-debug-rules.template b/spec-debug-rules.template new file mode 100644 index 00000000..380115c1 --- /dev/null +++ b/spec-debug-rules.template @@ -0,0 +1,61 @@ +# +# Setup sources +# +%prep +%setup -n %{gs_name}-%{gs_version} + +# +# Build commands +# +%build +if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then + . %{gs_root}/Makefiles/GNUstep.sh +fi +# Argh - this doesn't work +CFLAGS=$RPM_OPT_FLAGS +make debug=no +make debug=yes + +# +# Install commands (generate file list too) +# +%install +if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then + . %{gs_root}/Makefiles/GNUstep.sh +fi +# build the non debugging file list +mkdir tmp-rpm-build-%{gs_name} +make debug=no \ + GNUSTEP_INSTALL_BASE=tpm/ \ + GNUSTEP_INSTALLATION_DIR=tpm/%{gs_install_dir} \ + filelist=yes install +rm -rf tmp-rpm-build-%{gs_name} + +# build the debugging file list +make debug=yes \ + GNUSTEP_INSTALL_BASE=$RPM_BUILD_ROOT \ + GNUSTEP_INSTALLATION_DIR=$RPM_BUILD_ROOT%{gs_install_dir} \ + filelist=yes install + +# Now filter the debugging file list against the non debugging one +# +# We use `grep': +# `-f file-list-debug' gets the lines to match from file-list-debug +# `-x' gets only matches which match whole lines +# `-v' inverts the matching, so lines which do not match are outputted +# +#mv file-list-debug file-list.tmp +#grep -f file-list.tmp -v -x file-list >> file-list-debug.tmp +#echo "%attr (-, root, root)" > file-list-debug +#cat file-list-debug.tmp >> file-list-debug + +# +# Clean commands +# +%clean +rm -rf $RPM_BUILD_ROOT + +# +# File list (generated by `%install') +# +%files -f file-list-debug diff --git a/spec-rules.template b/spec-rules.template new file mode 100644 index 00000000..c44b46c7 --- /dev/null +++ b/spec-rules.template @@ -0,0 +1,39 @@ +# +# Setup sources +# +%prep +%setup -n %{gs_name}-%{gs_version} + +# +# Build commands +# +%build +if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then + . %{gs_root}/Makefiles/GNUstep.sh +fi +# Argh - this doesn't work +CFLAGS=$RPM_OPT_FLAGS +make + +# +# Install commands (generate file list too) +# +%install +if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then + . %{gs_root}/Makefiles/GNUstep.sh +fi + +make GNUSTEP_INSTALL_BASE=$RPM_BUILD_ROOT \ + GNUSTEP_INSTALLATION_DIR=$RPM_BUILD_ROOT%{gs_install_dir} \ + filelist=yes install + +# +# Clean commands +# +%clean +rm -rf $RPM_BUILD_ROOT + +# +# File list (generated by `%install') +# +%files -f file-list