diff options
| author | Joep Loijens | 2015-02-24 20:53:28 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-02-25 17:34:30 +0000 |
| commit | 3bf9fc9bcb43a11da8d43d860ea2ad744a79c962 (patch) | |
| tree | 673dd0a5bf7e38f07434df703b9f6f8790b75ef9 /Library | |
| parent | 6f67f419ed627df55129eb620a806979d48905ae (diff) | |
| download | homebrew-3bf9fc9bcb43a11da8d43d860ea2ad744a79c962.tar.bz2 | |
jhead 3.00
Version bump, modernize, and a test.
jhead: patch makefile to provide a proper install target
Closes #37157.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/jhead.rb | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/Library/Formula/jhead.rb b/Library/Formula/jhead.rb index b2e3a502a..6ee5e93f6 100644 --- a/Library/Formula/jhead.rb +++ b/Library/Formula/jhead.rb @@ -1,14 +1,52 @@ -require 'formula' - class Jhead < Formula - homepage 'http://www.sentex.net/~mwandel/jhead/' - url 'http://www.sentex.net/~mwandel/jhead/jhead-2.97.tar.gz' - sha1 'ca4965a19d60078a3fe2cfb6d3635a083f958f2e' + homepage "http://www.sentex.net/~mwandel/jhead/" + url "http://www.sentex.net/~mwandel/jhead/jhead-3.00.tar.gz" + sha1 "6bd3faa38cc884b5370e8e8f15bc10cbb706ec7a" + + # Patch to provide a proper install target to the Makefile. The patch has + # been submitted upstream through email. We need to carry this patch until + # upstream decides to incorporate it. + patch :DATA def install - system "make" - bin.install "jhead" - man1.install 'jhead.1' - doc.install 'usage.html' + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system "#{bin}/jhead", test_fixtures("test.jpg") end end + +__END__ +--- a/makefile 2015-02-02 23:24:06.000000000 +0100 ++++ b/makefile 2015-02-25 16:31:21.000000000 +0100 +@@ -1,12 +1,18 @@ + #-------------------------------- + # jhead makefile for Unix + #-------------------------------- ++PREFIX=$(DESTDIR)/usr/local ++BINDIR=$(PREFIX)/bin ++DOCDIR=$(PREFIX)/share/doc/jhead ++MANDIR=$(PREFIX)/share/man/man1 + OBJ=. + SRC=. + CFLAGS:= $(CFLAGS) -O3 -Wall + + all: jhead + ++docs = $(SRC)/usage.html ++ + objs = $(OBJ)/jhead.o $(OBJ)/jpgfile.o $(OBJ)/jpgqguess.o $(OBJ)/paths.o \ + $(OBJ)/exif.o $(OBJ)/iptc.o $(OBJ)/gpsinfo.o $(OBJ)/makernote.o + +@@ -19,5 +25,8 @@ + clean: + rm -f $(objs) jhead + +-install: +- cp jhead ${DESTDIR}/usr/local/bin/ ++install: all ++ install -d $(BINDIR) $(DOCDIR) $(MANDIR) ++ install -m 0755 jhead $(BINDIR) ++ install -m 0644 $(docs) $(DOCDIR) ++ install -m 0644 jhead.1 $(MANDIR) |
