mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-25 02:29:49 +00:00
simplified building of RPMs
This commit is contained in:
parent
991a00ee09
commit
ff892aaf57
@ -1,19 +1,16 @@
|
|||||||
# Makefile for creating Basilisk II distributions
|
# Makefile for creating Basilisk II distributions
|
||||||
# Written in 1999 by Christian Bauer <Christian.Bauer@uni-mainz.de>
|
# Written in 1999 by Christian Bauer <Christian.Bauer@uni-mainz.de>
|
||||||
|
|
||||||
VERSION := $(shell sed <BasiliskII.spec -n '/^\%define ver */s///p')
|
VERSION := $(shell sed <BasiliskII.spec -n '/^\%define version */s///p')
|
||||||
RELEASE := $(shell sed <BasiliskII.spec -n '/^\%define rel */s///p')
|
RELEASE := $(shell sed <BasiliskII.spec -n '/^\%define release */s///p')
|
||||||
VERNAME := BasiliskII-$(VERSION)
|
VERNAME := BasiliskII-$(VERSION)
|
||||||
|
|
||||||
SRCARCHIVE := $(shell date +BasiliskII_src_%d%m%Y.tar.gz)
|
SRCARCHIVE := $(shell date +BasiliskII_src_%d%m%Y.tar.gz)
|
||||||
SRCRPM := $(VERNAME)-$(RELEASE).src.rpm
|
|
||||||
BINRPM := $(VERNAME)-$(RELEASE).i386.rpm
|
|
||||||
AMIGAARCHIVE := $(VERNAME)-$(RELEASE).amiga.lzh
|
AMIGAARCHIVE := $(VERNAME)-$(RELEASE).amiga.lzh
|
||||||
BEOSPPCARCHIVE := $(VERNAME)-$(RELEASE).beosppc.zip
|
BEOSPPCARCHIVE := $(VERNAME)-$(RELEASE).beosppc.zip
|
||||||
BEOSX86ARCHIVE := $(VERNAME)-$(RELEASE).beosx86.zip
|
BEOSX86ARCHIVE := $(VERNAME)-$(RELEASE).beosx86.zip
|
||||||
|
|
||||||
TMPDIR := $(shell date +/tmp/build%M%S)
|
TMPDIR := $(shell date +/tmp/build%M%S)
|
||||||
RPMDIR := /usr/src/redhat
|
|
||||||
ISODATE := $(shell date "+%Y-%m-%d %H:%M")
|
ISODATE := $(shell date "+%Y-%m-%d %H:%M")
|
||||||
DOCS := $(shell sed <BasiliskII.spec -n '/^\%doc */s///p')
|
DOCS := $(shell sed <BasiliskII.spec -n '/^\%doc */s///p')
|
||||||
SRCS := src
|
SRCS := src
|
||||||
@ -28,14 +25,13 @@ default:
|
|||||||
help:
|
help:
|
||||||
@echo "The following targets are available:"
|
@echo "The following targets are available:"
|
||||||
@echo " tarball source tarball ($(SRCARCHIVE))"
|
@echo " tarball source tarball ($(SRCARCHIVE))"
|
||||||
@echo " rpm source and binary RPMs ($(SRCRPM) and $(BINRPM))"
|
@echo " rpm source and binary RPMs"
|
||||||
@echo " amiga AmigaOS binary archive ($(AMIGAARCHIVE))"
|
@echo " amiga AmigaOS binary archive ($(AMIGAARCHIVE))"
|
||||||
@echo " beosppc BeOS/ppc binary archive ($(BEOSPPCARCHIVE))"
|
@echo " beosppc BeOS/ppc binary archive ($(BEOSPPCARCHIVE))"
|
||||||
@echo " beosx86 BeOS/x86 binary archive ($(BEOSX86ARCHIVE))"
|
@echo " beosx86 BeOS/x86 binary archive ($(BEOSX86ARCHIVE))"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f $(SRCARCHIVE)
|
-rm -f $(SRCARCHIVE)
|
||||||
-rm -f $(SRCRPM) $(BINRPM)
|
|
||||||
-rm -f $(AMIGAARCHIVE) $(BEOSPPCARCHIVE) $(BEOSX86ARCHIVE)
|
-rm -f $(AMIGAARCHIVE) $(BEOSPPCARCHIVE) $(BEOSX86ARCHIVE)
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -47,7 +43,8 @@ $(SRCARCHIVE): $(SRCS) $(DOCS)
|
|||||||
-rm -rf $(TMPDIR)
|
-rm -rf $(TMPDIR)
|
||||||
mkdir $(TMPDIR)
|
mkdir $(TMPDIR)
|
||||||
cd $(TMPDIR); cvs export -D "$(ISODATE)" BasiliskII
|
cd $(TMPDIR); cvs export -D "$(ISODATE)" BasiliskII
|
||||||
rm $(TMPDIR)/BasiliskII/BasiliskII.spec $(TMPDIR)/BasiliskII/Makefile
|
cp src/Unix/config.h.in src/Unix/configure $(TMPDIR)/BasiliskII/src/Unix
|
||||||
|
rm $(TMPDIR)/BasiliskII/Makefile
|
||||||
rm -rf $(TMPDIR)/BasiliskII/src/powerrom_cpu #not yet ready for distribution
|
rm -rf $(TMPDIR)/BasiliskII/src/powerrom_cpu #not yet ready for distribution
|
||||||
mv $(TMPDIR)/BasiliskII $(TMPDIR)/$(VERNAME)
|
mv $(TMPDIR)/BasiliskII $(TMPDIR)/$(VERNAME)
|
||||||
cd $(TMPDIR); tar cfz $@ $(VERNAME)
|
cd $(TMPDIR); tar cfz $@ $(VERNAME)
|
||||||
@ -55,21 +52,10 @@ $(SRCARCHIVE): $(SRCS) $(DOCS)
|
|||||||
rm -rf $(TMPDIR)
|
rm -rf $(TMPDIR)
|
||||||
|
|
||||||
#
|
#
|
||||||
# RPMs (source and i386 binary)
|
# RPMs (source and binary)
|
||||||
#
|
#
|
||||||
rpm: $(SRCRPM) $(BINRPM)
|
rpm: $(SRCARCHIVE)
|
||||||
|
rpm --tarball a $(SRCARCHIVE)
|
||||||
$(RPMDIR)/SOURCES/$(SRCARCHIVE): $(SRCARCHIVE)
|
|
||||||
cp $(SRCARCHIVE) $(RPMDIR)/SOURCES
|
|
||||||
|
|
||||||
$(RPMDIR)/SRPMS/$(SRCRPM) $(RPMDIR)/RPMS/i386/$(BINRPM): $(RPMDIR)/SOURCES/$(SRCARCHIVE) BasiliskII.spec
|
|
||||||
rpm -ba BasiliskII.spec
|
|
||||||
|
|
||||||
$(SRCRPM): $(RPMDIR)/SRPMS/$(SRCRPM)
|
|
||||||
cp $(RPMDIR)/SRPMS/$(SRCRPM) .
|
|
||||||
|
|
||||||
$(BINRPM): $(RPMDIR)/RPMS/i386/$(BINRPM)
|
|
||||||
cp $(RPMDIR)/RPMS/i386/$(BINRPM) .
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Binary archive for AmigaOS
|
# Binary archive for AmigaOS
|
||||||
|
Loading…
Reference in New Issue
Block a user