mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-24 14:48:53 +00:00
Updated and simplified rpm building. In particular, removed separate debug packages
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@24638 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9a868d4a12
commit
55602114b8
5 changed files with 48 additions and 171 deletions
20
ChangeLog
20
ChangeLog
|
@ -1,3 +1,23 @@
|
|||
2007-02-18 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
Updated rpm building code, and removed separate debug packages.
|
||||
* GNUmakefile.in (MAKE_FILES): Removed spec-debug-rules.template.
|
||||
* spec-debug-rules.template: File removed.
|
||||
* Master/rpm.make (internal-after-install): Use DESTDIR instead of
|
||||
INSTALL_ROOT_DIR. Enhanced sed expression to only remove DESTDIR
|
||||
from the beginning of paths.
|
||||
($(PACKAGE_NAME)-debug.spec.in): Rule removed.
|
||||
($(SPEC_FILE)): Do not set %gs_root. Set %gs_install_domain
|
||||
instead of %gs_install_dir. Set %gs_makefiles. Do not append
|
||||
'-debug' to name for no longer existing debug packages. Do not
|
||||
set Prefix: or requires:.
|
||||
Removed special variable settings for debug packages.
|
||||
* spec-rules.template: Check GNUSTEP_MAKEFILES, not
|
||||
GNUSTEP_SYSTEM_ROOT. Use %{gs_makefiles} to locate GNUstep.sh.
|
||||
When running configure, do not use --prefix. Use
|
||||
GNUSTEP_INSTALLATION_DOMAIN and not GNUSTEP_INSTALLATION_DIR when
|
||||
installing.
|
||||
|
||||
2007-02-18 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* config-noarch.make.in: Print a deprecation warning if any of the
|
||||
|
|
|
@ -84,7 +84,7 @@ MAKE_FILES = aggregate.make application.make bundle.make service.make \
|
|||
palette.make gswapp.make gswbundle.make clibrary.make \
|
||||
documentation.make \
|
||||
java-executable.template java-tool.make framework.make \
|
||||
native-library.make spec-rules.template spec-debug-rules.template \
|
||||
native-library.make spec-rules.template \
|
||||
tar-exclude-list gnustep-make-help
|
||||
|
||||
MASTER_MAKE_FILES = \
|
||||
|
|
145
Master/rpm.make
145
Master/rpm.make
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Makefile rules to build a RPM spec files and RPM packages
|
||||
#
|
||||
# Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2007 Free Software Foundation, Inc.
|
||||
#
|
||||
# Author: Nicola Pero <n.pero@mi.flashnet.it>
|
||||
#
|
||||
|
@ -27,10 +27,6 @@
|
|||
# FIXME/TODO: Update for GNUSTEP_BUILD_DIR
|
||||
#
|
||||
|
||||
#
|
||||
# FIXME/TODO: Replace GNUSTEP_INSTALLATION_DIR with GNUSTEP_INSTALLATION_DOMAIN
|
||||
#
|
||||
|
||||
# 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
|
||||
|
@ -42,13 +38,8 @@
|
|||
# declared in the makefile of course>.
|
||||
#
|
||||
#
|
||||
# You can build two kind of packages:
|
||||
# - normal packages
|
||||
# - debugging packages
|
||||
# When building a package, the make package generates automatically:
|
||||
#
|
||||
# First we describe normal packages.
|
||||
#
|
||||
# the make package generates automatically:
|
||||
# * the .tgz source file to be copied into where_you_build_rpms/SOURCES/
|
||||
# <generated by source-dist.make>
|
||||
#
|
||||
|
@ -79,20 +70,20 @@
|
|||
#
|
||||
# The other important variable you may want to set in your makefiles is
|
||||
#
|
||||
# GNUSTEP_INSTALLATION_DIR - Installation dir (defaults to GNUSTEP_LOCAL_ROOT)
|
||||
#
|
||||
# If your package is relocatable (this is true by default - see below
|
||||
# for how to make it non-relocatable) the user will be able to install
|
||||
# the package elsewhere by using something like `rpm -Uvh --prefix
|
||||
# /home/nicola/GNUstep your_package.rpm' when installing the package.
|
||||
# GNUSTEP_INSTALLATION_DOMAIN - Installation domain (defaults to LOCAL)
|
||||
#
|
||||
# Make sure that your filesystem layout matches the one of your target
|
||||
# system else your files might end up in the wrong directory when
|
||||
# installed. In other words, use the same version of gnustep-make
|
||||
# that will be used on the target system, and configured in the same
|
||||
# way.
|
||||
|
||||
# [2] Provide a $(PACKAGE_NAME).spec.in file, which contains the RPM
|
||||
# spec preamble. Here is an example:
|
||||
|
||||
# Summary: A table board game
|
||||
# Release: 1
|
||||
# Copyright: GPL
|
||||
# License: GPL
|
||||
# Group: Amusements/Games
|
||||
# Source: http://www.gnustep.it/nicola/Applications/Gomoku/%{gs_name}-%{gs_version}.tar.gz
|
||||
#
|
||||
|
@ -108,28 +99,16 @@
|
|||
# entries. These are generated automatically; `Name' and `Version'
|
||||
# from $(PACKAGE_NAME) and $(PACKAGE_VERSION), and so for BuildRoot
|
||||
# and Prefix. you might include all the other tags listed in the RPM
|
||||
# doc if you want. The `Prefix:' entry is automatically included only
|
||||
# if your package is relocatable (should be the default for all
|
||||
# non-system packages. If you want your package to be non-relocatable
|
||||
# (to be used only for system packages which *must* be installed in
|
||||
# GNUSTEP_SYSTEM_ROOT), add the line
|
||||
#
|
||||
# RPM_DISABLE_RELOCATABLE=YES
|
||||
#
|
||||
# (FIXME improve variable name) to your GNUmakefile. This will not generate
|
||||
# a `Prefix:' line in the spec file.
|
||||
#
|
||||
# doc if you want.
|
||||
#
|
||||
# You can use the following if you need:
|
||||
# %{gs_name} expands to the value of the make variable PACKAGE_NAME
|
||||
# %{gs_version} expands to the value of the make variable PACKAGE_VERSION
|
||||
# (make sure you use them in `Source:' as shown).
|
||||
#
|
||||
#
|
||||
|
||||
# A special note: if you need `./configure --prefix=/usr/GNUstep'
|
||||
# (/usr/GNUstep being replaced by your GNUSTEP_SYSTEM_ROOT) to be run
|
||||
# before compilation (usually only needed for GNUstep core libraries
|
||||
# A special note: if you need `./configure' to be run before
|
||||
# compilation (usually only needed for GNUstep core libraries
|
||||
# themselves), define the following make variable:
|
||||
#
|
||||
# PACKAGE_NEEDS_CONFIGURE = YES
|
||||
|
@ -142,33 +121,6 @@
|
|||
# `make specfile' will generate the (matching) specfile.
|
||||
#
|
||||
|
||||
#
|
||||
# Debugging packages.
|
||||
#
|
||||
|
||||
#
|
||||
# A debugging package is called
|
||||
# $(PACKAGE_NAME)-debug-$(PACKAGE_VERSION) rather than
|
||||
# $(PACKAGE_NAME)-$(PACKAGE_VERSION). The source .tgz have the same
|
||||
# name though. The source rpm package instead has a different name
|
||||
# because it contains the .spec file, which is different between debug
|
||||
# and non debug version.
|
||||
#
|
||||
# To build the spec for the debugging package, type `make debug=yes specfile'.
|
||||
# This builds a specfile as for the non-debugging package, except:
|
||||
#
|
||||
# It uses $(PACKAGE_NAME)-debug.spec.in rather than
|
||||
# ${PACKAGE_NAME).spec.in if found. (this allows you to customize
|
||||
# package description, summary, release number, group for the
|
||||
# debugging case).
|
||||
#
|
||||
# It will compile everything with debugging enabled when building the
|
||||
# debugging package.
|
||||
#
|
||||
# It will manage the package having a different name (eg
|
||||
# Gomoku-debug-1.1.1) than the .tgz (eg Gomoku-1.1.1.tgz).
|
||||
#
|
||||
|
||||
#
|
||||
# As said before, if you are very lazy, typing something like
|
||||
#
|
||||
|
@ -191,16 +143,6 @@
|
|||
# we are being called inside the rpm installation stage, and we need
|
||||
# to produce the file list from the installed files.
|
||||
#
|
||||
# PS: The old way of doing that used to be --
|
||||
#
|
||||
# make INSTALL_ROOT_DIR=/var/tmp/package-build/ \
|
||||
# GNUSTEP_INSTALLATION_DIR=/var/tmp/package-build/usr/GNUstep/Local \
|
||||
# filelist=yes install
|
||||
#
|
||||
# We still support that as well, but using DESTDIR is recommended
|
||||
# (since it's a widely accepted GNU standard); INSTALL_ROOT_DIR is
|
||||
# deprecated.
|
||||
|
||||
GNUSTEP_FILE_LIST = $(GNUSTEP_OBJ_DIR)/file-list
|
||||
|
||||
ifeq ($(filelist),yes)
|
||||
|
@ -213,34 +155,16 @@ ifeq ($(filelist),yes)
|
|||
$(ECHO_NOTHING)rm -f $(GNUSTEP_FILE_LIST)$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "%attr (-, root, root)" >> $(GNUSTEP_FILE_LIST)$(END_ECHO)
|
||||
|
||||
# install - done by other GNUmakefiles - NB: must install everything inside
|
||||
# GNUSTEP_INSTALLATION_DIR, or prefix all installation dirs with
|
||||
# $DESTDIR such as
|
||||
# $(INSTALL_DATA) page.html $(DESTDIR)/usr/local/MySoftware/
|
||||
# instead of $(INSTALL_DATA) page.html /usr/local/MySoftware/
|
||||
#
|
||||
|
||||
# Please note that (the now deprecated) INSTALL_ROOT_DIR is similar to DESTDIR, but does not
|
||||
# affect GNUSTEP_INSTALLATION_DIR, which is supposed to already
|
||||
# include INSTALL_ROOT_DIR. Ie, make INSTALL_ROOT_DIR=/tmp won't
|
||||
# affect GNUSTEP_INSTALLATION_DIR and so wouldn't install everything
|
||||
# in /tmp, while make DESTDIR=/tmp would.
|
||||
#
|
||||
# We now support DESTDIR, so if DESTDIR is set,
|
||||
# INSTALL_ROOT_DIR is automatically set to be the same as DESTDIR
|
||||
# in common.make. To remove support for INSTALL_ROOT_DIR, just replace
|
||||
# INSTALL_ROOT_DIR with DESTDIR everywhere in this file.
|
||||
|
||||
# Get the list of files inside INSTALL_ROOT_DIR
|
||||
# Get the list of files inside DESTDIR
|
||||
internal-after-install::
|
||||
$(ECHO_NOTHING)for file in `$(TAR) Pcf - $(INSTALL_ROOT_DIR) | $(TAR) t`; do \
|
||||
$(ECHO_NOTHING)for file in `$(TAR) Pcf - $(DESTDIR) | $(TAR) t`; do \
|
||||
if [ -d "$$file" ]; then \
|
||||
echo "%dir $$file" > /dev/null; \
|
||||
else \
|
||||
echo "$$file" >> $(GNUSTEP_FILE_LIST); \
|
||||
fi; \
|
||||
done$(END_ECHO)
|
||||
$(ECHO_NOTHING)sed -e "s|$(INSTALL_ROOT_DIR)||" $(GNUSTEP_FILE_LIST) > file-list.tmp$(END_ECHO)
|
||||
$(ECHO_NOTHING)sed -e "s|^$(DESTDIR)||" $(GNUSTEP_FILE_LIST) > file-list.tmp$(END_ECHO)
|
||||
$(ECHO_NOTHING)mv file-list.tmp $(GNUSTEP_FILE_LIST)$(END_ECHO)
|
||||
|
||||
# endif # MAKELEVEL
|
||||
|
@ -250,23 +174,11 @@ endif # filelist == yes
|
|||
# NB: The filelist is automatically deleted when GNUSTEP_OBJ_DIR is
|
||||
# deleted (that is, by make clean)
|
||||
|
||||
#
|
||||
# Manage debug vs non-debug
|
||||
#
|
||||
SPEC_FILE_NAME=$(PACKAGE_NAME).spec
|
||||
SPEC_FILE=$(GNUSTEP_OBJ_DIR)/$(SPEC_FILE_NAME)
|
||||
|
||||
ifneq ($(debug), yes)
|
||||
SPEC_RULES_TEMPLATE=$(GNUSTEP_MAKEFILES)/spec-rules.template
|
||||
SPEC_IN=$(PACKAGE_NAME).spec.in
|
||||
SPEC_SCRIPT_IN=$(PACKAGE_NAME).script.spec.in
|
||||
PACKAGE_EXTENSION=""
|
||||
else
|
||||
SPEC_RULES_TEMPLATE=$(GNUSTEP_MAKEFILES)/spec-debug-rules.template
|
||||
SPEC_IN=$(PACKAGE_NAME)-debug.spec.in
|
||||
SPEC_SCRIPT_IN=$(PACKAGE_NAME)-debug.script.spec.in
|
||||
PACKAGE_EXTENSION="-debug"
|
||||
endif
|
||||
SPEC_RULES_TEMPLATE=$(GNUSTEP_MAKEFILES)/spec-rules.template
|
||||
SPEC_IN=$(PACKAGE_NAME).spec.in
|
||||
SPEC_SCRIPT_IN=$(PACKAGE_NAME).script.spec.in
|
||||
|
||||
.PHONY: specfile rpm check-RPM_TOPDIR
|
||||
|
||||
|
@ -275,15 +187,6 @@ endif
|
|||
#
|
||||
specfile: $(SPEC_FILE)
|
||||
|
||||
#
|
||||
# Issue a warning if the $(PACKAGE_NAME)-debug.spec.in file is not found
|
||||
#
|
||||
$(PACKAGE_NAME)-debug.spec.in:
|
||||
$(ECHO_NOTHING)echo "WARNING - $(PACKAGE_NAME)-debug.spec.in not found!"$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "Using $(PACKAGE_NAME).spec.in instead ..."$(END_ECHO)
|
||||
$(ECHO_NOTHING)cp $(PACKAGE_NAME).spec.in $(PACKAGE_NAME)-debug.spec.in$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo ""$(END_ECHO)
|
||||
|
||||
#
|
||||
# This is the real target - depends on having a correct .spec.in file
|
||||
#
|
||||
|
@ -296,10 +199,10 @@ $(SPEC_FILE): $(SPEC_IN) $(GNUSTEP_OBJ_DIR)
|
|||
$(ECHO_NOTHING)echo "##" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo " " >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "## Code dynamically generated" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "%define gs_root $(GNUSTEP_SYSTEM_ROOT)" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "%define gs_install_dir $(GNUSTEP_INSTALLATION_DIR)" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "%define gs_name $(PACKAGE_NAME)" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "%define gs_version $(PACKAGE_VERSION)" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "%define gs_install_domain $(GNUSTEP_INSTALLATION_DOMAIN)" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "%define gs_makefiles $(GNUSTEP_MAKEFILES)" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "%define gs_file_list $(GNUSTEP_FILE_LIST)" >> $@$(END_ECHO)
|
||||
ifeq ($(PACKAGE_NEEDS_CONFIGURE),YES)
|
||||
$(ECHO_NOTHING)echo "%define gs_configure YES" >> $@$(END_ECHO)
|
||||
|
@ -307,15 +210,9 @@ else
|
|||
$(ECHO_NOTHING)echo "%define gs_configure NO" >> $@$(END_ECHO)
|
||||
endif
|
||||
$(ECHO_NOTHING)echo " " >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "Name: %{gs_name}$(PACKAGE_EXTENSION)" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "Name: %{gs_name}" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "Version: %{gs_version}" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "BuildRoot: /var/tmp/%{gs_name}-buildroot" >> $@$(END_ECHO)
|
||||
ifeq ($(RPM_DISABLE_RELOCATABLE),YES)
|
||||
$(ECHO_NOTHING)echo "Prefix: %{gs_install_dir}" >> $@$(END_ECHO)
|
||||
endif
|
||||
ifeq ($(debug),yes)
|
||||
$(ECHO_NOTHING)echo "requires: %{gs_name} = %{gs_version}" >> $@$(END_ECHO)
|
||||
endif
|
||||
$(ECHO_NOTHING)echo "" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)echo "## Code from $(SPEC_IN)" >> $@$(END_ECHO)
|
||||
$(ECHO_NOTHING)cat $(SPEC_IN) >> $@$(END_ECHO)
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
#
|
||||
# Setup sources
|
||||
#
|
||||
%prep
|
||||
%setup -n %{gs_name}-%{gs_version}
|
||||
|
||||
#
|
||||
# Build commands
|
||||
#
|
||||
%build
|
||||
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
|
||||
. %{gs_root}/Library/Makefiles/GNUstep.sh
|
||||
fi
|
||||
if [ "%{gs_configure}" = "YES" ]; then
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{gs_root}
|
||||
fi
|
||||
make debug=yes
|
||||
|
||||
#
|
||||
# Install commands (generate file list too)
|
||||
#
|
||||
%install
|
||||
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
|
||||
. %{gs_root}/Library/Makefiles/GNUstep.sh
|
||||
fi
|
||||
make debug=yes \
|
||||
DESTDIR=$RPM_BUILD_ROOT \
|
||||
GNUSTEP_INSTALLATION_DIR=%{gs_install_dir} \
|
||||
filelist=yes install
|
||||
|
||||
#
|
||||
# Clean commands
|
||||
#
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
#
|
||||
# File list (generated by install)
|
||||
#
|
||||
%files -f %{gs_file_list}
|
|
@ -8,11 +8,11 @@
|
|||
# Build commands
|
||||
#
|
||||
%build
|
||||
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
|
||||
. %{gs_root}/Library/Makefiles/GNUstep.sh
|
||||
if [ -z "$GNUSTEP_MAKEFILES" ]; then
|
||||
. %{gs_makefiles}/GNUstep.sh
|
||||
fi
|
||||
if [ "%{gs_configure}" = "YES" ]; then
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{gs_root}
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure
|
||||
fi
|
||||
make
|
||||
|
||||
|
@ -20,12 +20,12 @@ make
|
|||
# Install commands (generate file list too)
|
||||
#
|
||||
%install
|
||||
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
|
||||
. %{gs_root}/Library/Makefiles/GNUstep.sh
|
||||
if [ -z "$GNUSTEP_MAKEFILES" ]; then
|
||||
. %{gs_makefiles}/GNUstep.sh
|
||||
fi
|
||||
|
||||
make DESTDIR=$RPM_BUILD_ROOT \
|
||||
GNUSTEP_INSTALLATION_DIR=%{gs_install_dir} \
|
||||
GNUSTEP_INSTALLATION_DOMAIN=%{gs_install_domain} \
|
||||
filelist=yes install
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue