better packaging support
- fixed failure to install examples for tarball installs Mf-install.in - improved packaging support: replaced bintar script with bintar directory and make file; tarballs are created via "make create-tarball" and are placed in the workarea's bintar directory. added rpm directory and make file for creating RPMs via "make create-rpm". added pkg directory and make file for creating OSX packages via "make create-pkg". bintar (removed), bintar/Makefile (new), rpm/Makefile (new), pkg/Makefile (new), pkg/rmpkg (new), workarea, checkin, newrelease, Makefile.in, Makefile-workarea.in. original commit: fdff97d15cd827eb8fbef200c0f495a4bfaefff3
This commit is contained in:
parent
38d1000f70
commit
0b89f4fe82
13
LOG
13
LOG
|
@ -1087,7 +1087,7 @@
|
|||
- generated Mf-install InstallBin (InstallLib, InstallMan) now
|
||||
correctly indirects through InstallPrefix if the --installbin
|
||||
(--installlib, --installman) configure flag is not present.
|
||||
src/configure
|
||||
configure
|
||||
- removed definition of generate-procedure-source-information
|
||||
patch.ss
|
||||
- guardian tconc cells are now allocated in generation 0 in the hope
|
||||
|
@ -1187,3 +1187,14 @@
|
|||
compile.ss,
|
||||
7.ms,
|
||||
root-experr*, patch*
|
||||
- fixed failure to install examples for tarball installs
|
||||
Mf-install.in
|
||||
- improved packaging support:
|
||||
replaced bintar script with bintar directory and make file;
|
||||
tarballs are created via "make create-tarball" and are placed in
|
||||
the workarea's bintar directory. added rpm directory and make
|
||||
file for creating RPMs via "make create-rpm". added pkg directory
|
||||
and make file for creating OSX packages via "make create-pkg".
|
||||
bintar (removed), bintar/Makefile (new), rpm/Makefile (new),
|
||||
pkg/Makefile (new), pkg/rmpkg (new), workarea, checkin, newrelease,
|
||||
Makefile.in, Makefile-workarea.in.
|
||||
|
|
73
bintar
73
bintar
|
@ -1,73 +0,0 @@
|
|||
#! /bin/csh -f
|
||||
|
||||
set T = "."
|
||||
if ("$argv[1]" == "--target-dir") then
|
||||
set T = "$argv[2]"
|
||||
shift
|
||||
shift
|
||||
endif
|
||||
|
||||
if ($#argv != 2 && $#argv != 3) then
|
||||
echo "Usage: $0 [ --target-dir <target-directory> ] <release> <machine-type> [ <workarea> ]"
|
||||
exit 1
|
||||
endif
|
||||
|
||||
set R = $argv[1]
|
||||
set M = $argv[2]
|
||||
if ($#argv == 2) then
|
||||
set W = $M
|
||||
else
|
||||
set W = $argv[3]
|
||||
endif
|
||||
|
||||
if (!(-d $W)) then
|
||||
echo "Error: work area $W does not exist or is not a directory"
|
||||
exit 1
|
||||
endif
|
||||
|
||||
if (!(-e $W/boot/$M)) then
|
||||
echo "Error: "$
|
||||
exit 1
|
||||
endif
|
||||
|
||||
if (-e $R) then
|
||||
echo "Error: $R already exists"
|
||||
exit 1
|
||||
endif
|
||||
|
||||
onintr error
|
||||
|
||||
mkdir $R || goto error
|
||||
( cd $R ; ln -s ../LICENSE ../NOTICE . ) || goto error
|
||||
( cd $R ; ln -s ../$W/scheme.1.in ../$W/installsh ../$W/examples . ) || goto error
|
||||
( cd $R ; ln -s ../$W/Mf-install Makefile ) || goto error
|
||||
mkdir -p $R/boot/$M $R/bin/$M || goto error
|
||||
( cd $R/boot/$M ; ln -s ../../../$W/boot/$M/{scheme.h,petite.boot,scheme.boot} . ) || goto error
|
||||
|
||||
switch ($M)
|
||||
case a6nt:
|
||||
case ta6nt:
|
||||
case ti3nt:
|
||||
case i3nt:
|
||||
( cd $R/boot/$M ; ln -s ../../../$W/boot/$M/{csv951md.lib,csv951mt.lib,mainmd.obj,mainmt.obj,scheme.res} . ) || goto error
|
||||
( cd $R/bin/$M ; ln -s ../../../$W/bin/$M/{scheme.exe,csv951.dll,csv951.lib,vcruntime140.lib} . ) || goto error
|
||||
breaksw
|
||||
default:
|
||||
( cd $R/boot/$M ; ln -s ../../../$W/boot/$M/{main.o,kernel.o} . ) || goto error
|
||||
( cd $R/bin/$M ; ln -s ../../../$W/bin/$M/{scheme} . ) || goto error
|
||||
breaksw
|
||||
endsw
|
||||
|
||||
set broken = `find -L $R -type l`
|
||||
if ($#broken != 0) then
|
||||
echo "Error: missing $broken"
|
||||
goto error
|
||||
endif
|
||||
|
||||
tar -czhf $T/csv$R-$M.tar.gz $R || goto error
|
||||
rm -rf $R
|
||||
exit
|
||||
|
||||
error:
|
||||
rm -rf $R
|
||||
exit 1
|
86
bintar/Makefile
Normal file
86
bintar/Makefile
Normal file
|
@ -0,0 +1,86 @@
|
|||
# Makefile
|
||||
# Copyright 1984-2017 Cisco Systems, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
version = 9.5.1
|
||||
m := $(shell find ../bin/* -type d | xargs basename)
|
||||
|
||||
R = csv$(version)
|
||||
TARBALL = $(R)-$(m).tar.gz
|
||||
|
||||
CONTENTS=\
|
||||
$(R)/LICENSE\
|
||||
$(R)/NOTICE\
|
||||
$(R)/scheme.1.in\
|
||||
$(R)/installsh\
|
||||
$(R)/Makefile\
|
||||
$(R)/examples\
|
||||
$(R)/boot\
|
||||
$(R)/bin
|
||||
|
||||
$(TARBALL): $(CONTENTS)
|
||||
( BROKEN=`find -L $R -type l` ; \
|
||||
if test -n "$$BROKEN" ; then \
|
||||
echo "Error: missing $(BROKEN)" ; \
|
||||
exit 1 ; \
|
||||
fi )
|
||||
tar -czhf $(TARBALL) $R
|
||||
rm -rf $(R)
|
||||
|
||||
$(R)/LICENSE: $(R)
|
||||
( cd $(R) ; ln -s ../../../LICENSE . )
|
||||
|
||||
$(R)/NOTICE: $(R)
|
||||
( cd $(R) ; ln -s ../../../NOTICE . )
|
||||
|
||||
$(R)/scheme.1.in: $(R)
|
||||
( cd $(R) ; ln -s ../../scheme.1.in . )
|
||||
|
||||
$(R)/installsh: $(R)
|
||||
( cd $(R) ; ln -s ../../installsh . )
|
||||
|
||||
$(R)/Makefile: $(R)
|
||||
( cd $(R) ; ln -s ../../Mf-install Makefile )
|
||||
|
||||
$(R)/examples: $(R)
|
||||
( cd $(R) ; ln -s ../../examples . )
|
||||
|
||||
$(R)/boot: $(R)
|
||||
mkdir -p $(R)/boot/$(m)
|
||||
( cd $(R)/boot/$(m) ; ln -s ../../../../boot/$(m)/{scheme.h,petite.boot,scheme.boot} . )
|
||||
case $(m) in \
|
||||
*nt) \
|
||||
( cd $R/boot/$(m) ; ln -s ../../../../boot/$(m)/{csv951md.lib,csv951mt.lib,mainmd.obj,mainmt.obj,scheme.res} . ) \
|
||||
;; \
|
||||
*) \
|
||||
( cd $R/boot/$(m) ; ln -s ../../../../boot/$(m)/{main.o,kernel.o} . ) \
|
||||
;; \
|
||||
esac
|
||||
|
||||
$(R)/bin: $(R)
|
||||
mkdir -p $(R)/bin/$(m)
|
||||
case $(m) in \
|
||||
*nt) \
|
||||
( cd $R/bin/$(m) ; ln -s ../../../../bin/$(m)/{scheme.exe,csv951.dll,csv951.lib,vcruntime140.lib} . ) \
|
||||
;; \
|
||||
*) \
|
||||
( cd $R/bin/$(m) ; ln -s ../../../../bin/$(m)/scheme . ) \
|
||||
;; \
|
||||
esac
|
||||
|
||||
$(R):
|
||||
mkdir $(R)
|
||||
|
||||
clean:
|
||||
rm -rf $(R) $(TARBALL)
|
9
checkin
9
checkin
|
@ -62,7 +62,7 @@ if (-e $W/scheme.1.in) then
|
|||
endif
|
||||
endif
|
||||
|
||||
set tmpsdirs = (. c mats s examples unicode makefiles csug release_notes)
|
||||
set tmpsdirs = (. c mats s examples unicode makefiles csug release_notes bintar rpm pkg)
|
||||
set sdirs = ()
|
||||
foreach x ($tmpsdirs)
|
||||
if (!(-e $x)) then
|
||||
|
@ -90,8 +90,6 @@ echo '*** running "make clean" in source directories ***'
|
|||
foreach x ($sdirs)
|
||||
switch ($x)
|
||||
case .:
|
||||
(cd $W; /bin/rm -f petite.1 scheme.1)
|
||||
(cd $W; /bin/rm -f Make.out)
|
||||
case unicode:
|
||||
case unicode/UNIDATA:
|
||||
case makefiles:
|
||||
|
@ -103,7 +101,10 @@ foreach x ($sdirs)
|
|||
case mats:
|
||||
case benchmarks:
|
||||
case examples:
|
||||
(cd $W/$x; make clean > /dev/null)
|
||||
case bintar:
|
||||
case rpm:
|
||||
case pkg:
|
||||
(cd $W/$x; make clean >& /dev/null)
|
||||
breaksw
|
||||
default:
|
||||
echo "checkin error: unexpected sdir $x"
|
||||
|
|
|
@ -33,10 +33,22 @@ test: build
|
|||
bootfiles: build
|
||||
$(MAKE) -f Mf-boot
|
||||
|
||||
create-bintar: build
|
||||
(cd bintar && $(MAKE))
|
||||
|
||||
create-rpm: create-bintar
|
||||
(cd rpm && $(MAKE))
|
||||
|
||||
create-pkg: create-bintar
|
||||
(cd pkg && $(MAKE))
|
||||
|
||||
clean:
|
||||
rm -f petite.1 scheme.1
|
||||
(cd s ; $(MAKE) clean)
|
||||
(cd c ; $(MAKE) clean)
|
||||
(cd mats ; $(MAKE) clean)
|
||||
(cd examples ; $(MAKE) clean)
|
||||
(cd bintar ; $(MAKE) clean)
|
||||
(cd rpm ; $(MAKE) clean)
|
||||
(cd pkg ; $(MAKE) clean)
|
||||
rm -f Make.out
|
||||
|
|
|
@ -34,6 +34,15 @@ docs: build
|
|||
(cd csug && $(MAKE) m=$(m))
|
||||
(cd release_notes && $(MAKE) m=$(m))
|
||||
|
||||
create-bintar:
|
||||
(cd $(workarea) && $(MAKE) create-bintar)
|
||||
|
||||
create-rpm:
|
||||
(cd $(workarea) && $(MAKE) create-rpm)
|
||||
|
||||
create-pkg:
|
||||
(cd $(workarea) && $(MAKE) create-pkg)
|
||||
|
||||
clean:
|
||||
(cd $(workarea) && $(MAKE) clean)
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ maninstall: scheme.1 petite.1 ${Man}
|
|||
if [ ${GzipManPages} = yes ] ; then gzip -f ${Man}/${InstallPetiteName}.1 ; fi
|
||||
|
||||
liblibinstall: ${LibExamples}
|
||||
$I -m 444 ../examples/* ${LibExamples}
|
||||
$I -m 444 examples/* ${LibExamples}
|
||||
|
||||
${Lib}:
|
||||
$I -d -m 755 ${Lib}
|
||||
|
|
14
newrelease
14
newrelease
|
@ -75,9 +75,17 @@ if ($status != 0) exit 1
|
|||
|
||||
cd $W
|
||||
|
||||
/bin/rm -f bintar
|
||||
sed -e "s/csv[0-9][0-9][0-9]*/csv$ZR/g" ../bintar > bintar
|
||||
set updatedfiles = ($updatedfiles bintar)
|
||||
/bin/rm bintar/Makefile
|
||||
sed -e "s/^v = .*/v = $R/" ../bintar/Makefile > bintar/Makefile
|
||||
set updatedfiles = ($updatedfiles bintar/Makefile)
|
||||
|
||||
/bin/rm rpm/Makefile
|
||||
sed -e "s/^v = .*/v = $R/" ../rpm/Makefile > rpm/Makefile
|
||||
set updatedfiles = ($updatedfiles rpm/Makefile)
|
||||
|
||||
/bin/rm pkg/Makefile
|
||||
sed -e "s/^v = .*/v = $R/" ../pkg/Makefile > pkg/Makefile
|
||||
set updatedfiles = ($updatedfiles pkg/Makefile)
|
||||
|
||||
/bin/rm -f BUILDING
|
||||
sed -e "s/Chez Scheme Version [^ ]*/Chez Scheme Version $R/" \
|
||||
|
|
109
pkg/Makefile
Normal file
109
pkg/Makefile
Normal file
|
@ -0,0 +1,109 @@
|
|||
# Makefile
|
||||
# Copyright 1984-2017 Cisco Systems, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
m := $(shell find ../bin/* -type d | xargs basename)
|
||||
version = 9.5.1
|
||||
release = 1
|
||||
|
||||
DOTUSER = $(shell ls -ld . | sed -e 's/[^ ]* *[^ ]* *\([^ ]*\).*/\1/')
|
||||
DOTGROUP = $(shell ls -ldg . | sed -e 's/[^ ]* *[^ ]* *\([^ ]*\).*/\1/')
|
||||
BUILDROOT = $(m)$(version)
|
||||
RELEASE = csv$(version)
|
||||
TARBALL = $(RELEASE)-$(m).tar.gz
|
||||
PKG = $(RELEASE)-$(m)-$(release).pkg
|
||||
|
||||
PKGCONTENT =\
|
||||
$(BUILDROOT)/Resources/en.lproj/Welcome.html\
|
||||
$(BUILDROOT)/Resources/en.lproj/License.txt\
|
||||
$(BUILDROOT)/Distribution\
|
||||
$(BUIDROOT)/Root/bin\
|
||||
$(BUILDROOT)/Root/lib\
|
||||
$(BUILDROOT)/Root/man
|
||||
|
||||
$(PKG): $(BUILDROOT)/$(PKG)
|
||||
sudo /usr/bin/productbuild\
|
||||
--resources $(BUILDROOT)/Resources\
|
||||
--distribution $(BUILDROOT)/Distribution\
|
||||
--package-path $(BUILDROOT)\
|
||||
$(PKG)
|
||||
sudo chown $(DOTUSER):$(DOTGROUP) $(PKG)
|
||||
sudo /bin/rm -rf $(RELEASE) $(BUILDROOT)
|
||||
|
||||
$(BUILDROOT)/$(PKG): $(PKGCONTENT)
|
||||
sudo /usr/bin/pkgbuild\
|
||||
--root $(BUILDROOT)/Root\
|
||||
--identifier chezscheme\
|
||||
--version $(version)\
|
||||
--install-location /\
|
||||
--ownership recommended\
|
||||
$(BUILDROOT)/$(PKG)
|
||||
|
||||
$(BUILDROOT)/Distribution: $(BUILDROOT)
|
||||
echo '<?xml version="1.0" encoding="utf-8" standalone="no"?>' > $(BUILDROOT)/Distribution
|
||||
echo '<installer-gui-script minSpecVersion="1">' >> $(BUILDROOT)/Distribution
|
||||
echo ' <pkg-ref id="chezscheme">' >> $(BUILDROOT)/Distribution
|
||||
echo ' <bundle-version/>' >> $(BUILDROOT)/Distribution
|
||||
echo ' </pkg-ref>' >> $(BUILDROOT)/Distribution
|
||||
echo ' <title>Chez Scheme</title>' >> $(BUILDROOT)/Distribution
|
||||
echo ' <welcome file="Welcome.html"/>' >> $(BUILDROOT)/Distribution
|
||||
echo ' <license file="License.txt"/>' >> $(BUILDROOT)/Distribution
|
||||
echo ' <options customize="never" rootVolumeOnly="true"/>' >> $(BUILDROOT)/Distribution
|
||||
echo ' <options customize="never" require-scripts="false"/>' >> $(BUILDROOT)/Distribution
|
||||
echo ' <choices-outline>' >> $(BUILDROOT)/Distribution
|
||||
echo ' <line choice="default">' >> $(BUILDROOT)/Distribution
|
||||
echo ' <line choice="chezscheme"/>' >> $(BUILDROOT)/Distribution
|
||||
echo ' </line>' >> $(BUILDROOT)/Distribution
|
||||
echo ' </choices-outline>' >> $(BUILDROOT)/Distribution
|
||||
echo ' <choice id="default"/>' >> $(BUILDROOT)/Distribution
|
||||
echo ' <choice id="chezscheme" visible="false">' >> $(BUILDROOT)/Distribution
|
||||
echo ' <pkg-ref id="chezscheme"/>' >> $(BUILDROOT)/Distribution
|
||||
echo ' </choice>' >> $(BUILDROOT)/Distribution
|
||||
echo ' <pkg-ref id="chezscheme" version="$(version)" onConclusion="none" installKBytes="1639">#$(PKG)</pkg-ref>' >> $(BUILDROOT)/Distribution
|
||||
echo '</installer-gui-script>' >> $(BUILDROOT)/Distribution
|
||||
chmod 644 $(BUILDROOT)/Distribution
|
||||
|
||||
$(BUILDROOT)/Resources/en.lproj/Welcome.html: $(BUILDROOT)/Resources/en.lproj
|
||||
echo 'cat << EOF > $(RESOURCES)/en.lproj/Welcome.html' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html
|
||||
echo '<html>' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html
|
||||
echo '<h3>Chez Scheme Version $(version)</h3>' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html
|
||||
echo '<p>Copyright (c) 2017 Cisco Systems, Inc.</p>' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html
|
||||
echo '<p>Chez Scheme is a programming language and an implementation of that language, with supporting tools and documentation.</p>' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html
|
||||
echo '</html>' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html
|
||||
chmod 644 $(BUILDROOT)/Resources/en.lproj/Welcome.html
|
||||
|
||||
$(BUILDROOT)/Resources/en.lproj/License.txt: $(BUILDROOT)/Resources/en.lproj
|
||||
cat ../../NOTICE ../../LICENSE > $(BUILDROOT)/Resources/en.lproj/License.txt
|
||||
chmod 644 $(BUILDROOT)/Resources/en.lproj/License.txt
|
||||
|
||||
$(BUILDROOT)/Resources/en.lproj: $(BUILDROOT)/Resources
|
||||
install -d $(BUILDROOT)/Resources/en.lproj
|
||||
|
||||
$(BUILDROOT)/Resources: $(BUILDROOT)
|
||||
install -d $(BUILDROOT)/Resources
|
||||
|
||||
$(BUIDROOT)/Root/bin $(BUILDROOT)/Root/lib $(BUILDROOT)/Root/man: $(BUILDROOT)/Root $(RELEASE)
|
||||
( cd $(RELEASE); sudo make install InstallGroup=wheel TempRoot=../$(BUILDROOT)/Root )
|
||||
|
||||
$(BUILDROOT)/Root: $(BUILDROOT)
|
||||
install -d $(BUILDROOT)/Root
|
||||
|
||||
$(RELEASE): $(BUILDROOT) ../bintar/$(TARBALL)
|
||||
tar -xzf ../bintar/$(TARBALL)
|
||||
|
||||
$(BUILDROOT):
|
||||
install -d $(BUILDROOT)
|
||||
|
||||
clean:
|
||||
rm -rf $(PKG) $(BUILDROOT) $(RELEASE)
|
37
pkg/rmpkg
Executable file
37
pkg/rmpkg
Executable file
|
@ -0,0 +1,37 @@
|
|||
#! /bin/csh -f
|
||||
|
||||
# rmpkg
|
||||
# Copyright 1984-2017 Cisco Systems, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if ( $#argv != 1) then
|
||||
echo "Usage: sudo $0 release"
|
||||
echo " e.g.,: sudo $0 8.4"
|
||||
exit 1
|
||||
endif
|
||||
|
||||
if ( `id -u` != 0 ) then
|
||||
echo "$0 must be run as root (e.g., via sudo)"
|
||||
exit 1
|
||||
endif
|
||||
|
||||
set R = $1
|
||||
|
||||
if (!(-e /usr/local/lib/csv$R)) then
|
||||
echo "(Petite) Chez Scheme Version $R doesn't appear to be installed"
|
||||
exit
|
||||
endif
|
||||
|
||||
/bin/rm -rf /usr/local/bin/petite /usr/local/bin/scheme /usr/local/bin/scheme-script /usr/local/lib/csv$R /usr/local/share/man/man1/petite.1.gz /usr/local/share/man/man1/scheme.1.gz
|
||||
pkgutil --forget chezscheme
|
84
rpm/Makefile
Normal file
84
rpm/Makefile
Normal file
|
@ -0,0 +1,84 @@
|
|||
# Makefile
|
||||
# Copyright 1984-2017 Cisco Systems, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
version = 9.5.1
|
||||
release = 1
|
||||
m := $(shell find ../bin/* -type d | xargs basename)
|
||||
arch := $(shell if test "$(m)" == "i3le" ; then echo i686 ; elif test "$(m)" == "a6le" ; then echo x86_64 ; else echo UNKNOWN ; fi)
|
||||
DOTUSER := $(shell ls -ld . | sed -e 's/[^ ]* *[^ ]* *\([^ ]*\).*/\1/')
|
||||
DOTGROUP := $(shell ls -ldg . | sed -e 's/[^ ]* *[^ ]* *\([^ ]*\).*/\1/')
|
||||
TMP := $(shell pwd)/tmp
|
||||
SPEC = $(TMP)/ChezScheme-$(version)-$(arch)-$(release).spec
|
||||
RELEASE = csv$(version)
|
||||
TARBALL = $(RELEASE)-$(m).tar.gz
|
||||
RPM = ChezScheme-$(version)-$(release).$(arch).rpm
|
||||
|
||||
|
||||
$(RPM): $(TMP)/$(RPM)
|
||||
sudo install -m 644 -o $(DOTUSER) -g $(DOTGROUP) $(TMP)/${RPM} .
|
||||
|
||||
$(TMP)/$(RPM): $(SPEC) $(TMP)/$(TARBALL)
|
||||
sudo setarch $(arch) rpmbuild\
|
||||
--target $(arch)\
|
||||
--define "_topdir $(TMP)" \
|
||||
--define "_srcrpmdir $(TMP)" \
|
||||
--define "_rpmdir $(TMP)" \
|
||||
--define "_sourcedir $(TMP)" \
|
||||
--define "_builddir $(TMP)" \
|
||||
--define "_rpmfilename %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm" \
|
||||
--quiet -ba $(SPEC)
|
||||
|
||||
$(SPEC): $(TMP)
|
||||
echo 'Summary: Chez Scheme: A high-performance version of Scheme' > $(SPEC)
|
||||
echo 'Name: ChezScheme' >> $(SPEC)
|
||||
echo 'Version: $(version)' >> $(SPEC)
|
||||
echo 'Release: $(release)' >> $(SPEC)
|
||||
echo 'Provides: ChezScheme-runtime-{VERSION}' >> $(SPEC)
|
||||
echo 'License: Apache 2.0' >> $(SPEC)
|
||||
echo 'URL: http://github.com/cisco/chezscheme' >> $(SPEC)
|
||||
echo 'Group: Development/Languages' >> $(SPEC)
|
||||
echo 'Source0: $(TARBALL)' >> $(SPEC)
|
||||
echo 'BuildRoot: %{_tmppath}/%{name}' >> $(SPEC)
|
||||
echo '%description' >> $(SPEC)
|
||||
echo 'Chez Scheme is a programming language and an implementation of that language,' >> $(SPEC)
|
||||
echo 'with supporting tools and documentation.' >> $(SPEC)
|
||||
echo '' >> $(SPEC)
|
||||
echo '%prep' >> $(SPEC)
|
||||
echo '' >> $(SPEC)
|
||||
echo '%setup -T -b 0 -n $(RELEASE)' >> $(SPEC)
|
||||
echo '' >> $(SPEC)
|
||||
echo '#%build' >> $(SPEC)
|
||||
echo '' >> $(SPEC)
|
||||
echo '%install' >> $(SPEC)
|
||||
echo 'make install TempRoot=%{buildroot}' >> $(SPEC)
|
||||
echo '' >> $(SPEC)
|
||||
echo '%files' >> $(SPEC)
|
||||
echo '#%doc NOTICE' >> $(SPEC)
|
||||
echo '#%doc LICENSE' >> $(SPEC)
|
||||
echo '/usr/lib/$(RELEASE)' >> $(SPEC)
|
||||
echo '/usr/bin/petite' >> $(SPEC)
|
||||
echo '/usr/bin/scheme' >> $(SPEC)
|
||||
echo '/usr/bin/scheme-script' >> $(SPEC)
|
||||
echo '/usr/share/man/man1/petite.1.gz' >> $(SPEC)
|
||||
echo '/usr/share/man/man1/scheme.1.gz' >> $(SPEC)
|
||||
|
||||
$(TMP)/$(TARBALL): $(TMP) ../bintar/$(TARBALL)
|
||||
cp ../bintar/$(TARBALL) $(TMP)
|
||||
|
||||
$(TMP):
|
||||
mkdir $(TMP)
|
||||
|
||||
clean:
|
||||
rm -rf $(TMP) $(RPM)
|
10
workarea
10
workarea
|
@ -237,6 +237,16 @@ case $M in
|
|||
;;
|
||||
esac
|
||||
|
||||
workdir $W/bintar
|
||||
(cd $W/bintar; workln ../../bintar/Makefile Makefile)
|
||||
|
||||
workdir $W/rpm
|
||||
(cd $W/rpm; workln ../../rpm/Makefile Makefile)
|
||||
|
||||
workdir $W/pkg
|
||||
(cd $W/pkg; workln ../../pkg/Makefile Makefile)
|
||||
(cd $W/pkg; workln ../../pkg/rmpkg rmpkg)
|
||||
|
||||
(cd $W; workln ../LOG LOG)
|
||||
(cd $W; forceworkln2 ../nanopass nanopass)
|
||||
(cd $W; workln ../makefiles/installsh installsh)
|
||||
|
|
Loading…
Reference in New Issue
Block a user