Add package building and new makefile tasks
This commit is contained in:
parent
e586f4a03e
commit
6c2cfaf8c9
3 changed files with 51 additions and 3 deletions
17
Makefile
17
Makefile
|
@ -19,6 +19,7 @@ OBJEND= o
|
|||
SRCEND= c
|
||||
# name of programm (and executable)
|
||||
NAME= adventgame
|
||||
VERSION= 0.1
|
||||
|
||||
# path to executable
|
||||
EXE = $(OUTDIR)/$(NAME)
|
||||
|
@ -57,11 +58,25 @@ run: $(OUTDIR)/$(NAME)
|
|||
./$(OUTDIR)/$(NAME) -v
|
||||
|
||||
man: $(DOCDIR)/$(NAME).6
|
||||
gzip $(DOCDIR)/$(NAME).6 > $(OUTDIR)/$(NAME).6.gz
|
||||
cat $(DOCDIR)/$(NAME).6 | gzip - > $(OUTDIR)/$(NAME).6.gz
|
||||
|
||||
man-test: $(DOCDIR)/$(NAME).6
|
||||
groff -man -Tascii $(DOCDIR)/$(NAME).6
|
||||
|
||||
install: compile man
|
||||
cp $(OUTDIR)/$(NAME) /usr/local/bin/
|
||||
cp $(OUTDIR)/$(NAME).6.gz /usr/local/man/
|
||||
|
||||
uninstall:
|
||||
rm /usr/local/bin/adventgame || true
|
||||
rm /usr/local/man/adventgame.6.gz || true
|
||||
|
||||
export: clean
|
||||
mkdir -p $(OUTDIR)/adventgame-$(VERSION)/
|
||||
cp -r src/ doc/ dist/ Makefile $(OUTDIR)/adventgame-$(VERSION)/
|
||||
cp README.rdoc $(OUTDIR)/adventgame-$(VERSION)/README
|
||||
tar cjf $(OUTDIR)/adventgame-$(VERSION).tar.bz2 -C $(OUTDIR)/ adventgame-$(VERSION)
|
||||
|
||||
# execute clean every time
|
||||
.PHONY: clean
|
||||
# don't show command in run target
|
||||
|
|
|
@ -7,8 +7,9 @@ In diesem Projekt soll (der Anfang) eines kleinen 2D-Spiels erstellt werden. Die
|
|||
|
||||
== Vorbedingungen
|
||||
Folgende Pakete/Programme/Libs sollten im System installiert sein:
|
||||
* libSDL
|
||||
* gcc, make
|
||||
* libSDL, SDL_TTF
|
||||
* gcc, make, groff
|
||||
* git
|
||||
|
||||
== Installation
|
||||
Um das Projekt zu starten, wird das Makefile verwendet. "make" baut das Projekt.
|
||||
|
|
32
dist/gentoo/adventgame-0.1.ebuild
vendored
Normal file
32
dist/gentoo/adventgame-0.1.ebuild
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
DESCRIPTION="Advent Game"
|
||||
HOMEPAGE="http://advent.aaron-mueller.de/"
|
||||
SRC_URI="http://cloud.github.com/downloads/aaronmueller/advent2009/adventgame-0.1.tar.bz2"
|
||||
|
||||
LICENSE="GPL"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
RESTRICT="strip"
|
||||
|
||||
src_unpack() {
|
||||
tar xfz "${A}" "${WORKDIR}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd "${WORKDIR}" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make install
|
||||
cp bin/adventgame ${D}/usr/bin/adventgame
|
||||
make man
|
||||
cp bin/adventgame.6.gz ${D}/usr/share/man/adventgame.6.gz
|
||||
}
|
||||
|
Loading…
Reference in a new issue