aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/nkf.rb
blob: 4b08fc03f6a7704f39e1ac41e1387871ae53c0b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
require 'formula'

class Nkf < Formula
  url 'http://dl.sourceforge.jp/nkf/53171/nkf-2.1.2.tar.gz'
  homepage 'http://sourceforge.jp/projects/nkf/'
  md5 '973b0b4d5ca5f0f8153e4d68b8412a39'

  def patches
    # Makefile patch
    DATA
  end

  def install
    ENV['prefix'] = prefix
    system 'make'
    system 'make install'
  end
end

__END__
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CC = cc
+#CC = cc
 CFLAGS = -g -O2 -Wall -pedantic
 # CFLAGS = -O3
 SHAR = shar 
@@ -7,7 +7,7 @@
 RM = rm -rf
 VERSION = 2.1.2
 MKDIR = mkdir
-prefix = /usr/local
+#prefix = /usr/local
 
 .PHONY: clean install test tar shar
 
@@ -35,13 +35,14 @@
 
 install:
 	-$(MKDIR) $(prefix)/bin
-	-$(MKDIR) $(prefix)/man
-	-$(MKDIR) $(prefix)/man/man1
-	-$(MKDIR) $(prefix)/man/ja
-	-$(MKDIR) $(prefix)/man/ja/man1
+	-$(MKDIR) $(prefix)/share
+	-$(MKDIR) $(prefix)/share/man
+	-$(MKDIR) $(prefix)/share/man/man1
+	-$(MKDIR) $(prefix)/share/man/ja
+	-$(MKDIR) $(prefix)/share/man/ja/man1
 	cp -f nkf $(prefix)/bin/
-	cp -f nkf.1 $(prefix)/man/man1/
-	cp -f nkf.1j $(prefix)/man/ja/man1/nkf.1
+	cp -f nkf.1 $(prefix)/share/man/man1/
+	cp -f nkf.1j $(prefix)/share/man/ja/man1/nkf.1
 
 shar:
 	-mkdir nkf-$(VERSION)