From 0dd8b3d23d15294955ad2185b8a0c45eb80959ba Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT service" Date: Fri, 6 Aug 2010 09:51:51 +0200 Subject: [PATCH] Makefile added / pkg-config descriptor --- .gitignore | 3 ++- Makefile | 42 ++++++++++++++++++++++++++++++++++++++++++ jar.metux-java.pc.in | 9 +++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 Makefile create mode 100644 jar.metux-java.pc.in diff --git a/.gitignore b/.gitignore index 79e5905..027d145 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.class -.svn .build +.svn +jar.metux-java.pc diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5e1d8e7 --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ + +VERSION=0.1.1 + +## install directories +PREFIX?=$(HOME)/.usr +LIBDIR?=$(PREFIX)/lib +DATADIR?=$(PREFIX)/share +PKGCONFIGDIR?=$(LIBDIR)/pkgconfig + +## build commands +ANT?=ant + + +JAR_INSTALL_DIR=$(DATADIR)/metux-java +JAR_INSTALL_FILE=$(JAR_INSTALL_DIR)/metux-java.jar +JAR_FILE=.build/metux-java.jar +PKGCONFIG_FILE=jar.metux-java.pc + + +all: $(JAR_FILE) $(PKGCONFIG_FILE) + +clean: + rm -f $(JAR_FILE) $(PKGCONFIG_FILE) + +build: $(JAR_FILE) $(PKGCONFIG_FILE) + +install: $(JAR_FILE) $(PKGCONFIG_FILE) + mkdir -p $(DESTDIR)$(JAR_INSTALL_DIR) $(DESTDIR)$(PKGCONFIGDIR) + cp $(JAR_FILE) $(DESTDIR)$(JAR_INSTALL_DIR) + cp $(PKGCONFIG_FILE) $(DESTDIR)$(PKGCONFIGDIR) + +$(JAR_FILE): + $(ANT) compile + +$(PKGCONFIG_FILE): $(PKGCONFIG_FILE).in + cat $< \ + | sed -e 's~@prefix@~$(PREFIX)~g' \ + | sed -e 's~@version@~$(VERSION)~g' \ + | sed -e 's~@datadir@~$(DATADIR)~g' \ + | sed -e 's~@jarfile@~$(JAR_INSTALL_FILE)~g' \ + | sed -e 's~@classpath@~$(JAR_INSTALL_FILE)~g' \ + >$@ diff --git a/jar.metux-java.pc.in b/jar.metux-java.pc.in new file mode 100644 index 0000000..1e29590 --- /dev/null +++ b/jar.metux-java.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +jarfile=@jarfile@ +classpath=@classpath@ + +Name: (jar) metux java classlib +Description: a library of certain useful java classes +Version: @version@ +Libs: +Cflags: -- 2.11.4.GIT