git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@8629 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2001-01-16 19:25:49 +00:00
parent c5c4da3a00
commit 7242fb6d64
4 changed files with 198 additions and 0 deletions

58
source-distribution.make Normal file
View file

@ -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 <fedor@gnu.org>
# Author: Nicola Pero <n.pero@mi.flashnet.it>
#
# 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:

View file

@ -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

61
spec-debug-rules.template Normal file
View file

@ -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

39
spec-rules.template Normal file
View file

@ -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