This repository was archived by the owner on Dec 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzpaq.rb
62 lines (51 loc) · 1.35 KB
/
zpaq.rb
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
60
61
require 'formula'
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Zpaq < Formula
homepage 'https://github.com/zpaq/zpaq/'
url 'https://github.com/zpaq/zpaq/archive/1ccc81277cb268d394b3174fffe1263294e34f01.tar.gz'
sha1 'e15df39b4dc5c66c2014e360264dd4714bbc66d4'
version '6.20'
head 'https://github.com/zpaq/zpaq.git'
env :std
def patches
DATA
end
def install
ENV.j1 # if your formula's build system can't parallelize
mkpath "#{share}/src"
cp Dir["*"],"#{share}/src"
system "make", "-f","Makefile.mac"
system "pod2man","zpaq.1.pod","zpaq.1"
system "pod2man","libzpaq.3.pod","libzpaq.3"
bin.install "zpaq"
bin.install "zpipe"
lib.install "libzpaq.o"
include.install "libzpaq.h"
man1.install "zpaq.1"
man3.install "libzpaq.3"
end
test do
system "true"
end
end
__END__
diff --git a/Makefile.mac b/Makefile.mac
index 8b7e749..2dac15a 100644
--- a/Makefile.mac
+++ b/Makefile.mac
@@ -1,13 +1,16 @@
-OBJECTS=zpaq.o libzpaq.o divsufsort.o
+OBJECTS=libzpaq.o divsufsort.o
-BINARY=zpaq
+BINARY=zpaq zpipe
CXXFLAGS=-Wall -O1 -DNDEBUG -Dunix -m64 -fopenmp
CXX=g++
all: $(BINARY)
-$(BINARY): $(OBJECTS)
+zpaq: zpaq.o $(OBJECTS)
+ g++ -o $@ $^
+
+zpipe: zpipe.o $(OBJECTS)
g++ -o $@ $^
clean: