forked from bindle/iOSPorts
/
Makefile-package
83 lines (71 loc) · 3.06 KB
/
Makefile-package
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#
# iOS Ports Library
# Copyright (C) 2010 Bindle Binaries
#
# @BINDLE_BINARIES_BSD_LICENSE_START@
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Bindle Binaries nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL BINDLE BINARIES BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# @BINDLE_BINARIES_BSD_LICENSE_END@
#
# Makefile -- automate downloading OpenLDAP
#
# common targets
all: $(PACKAGE_TARNAME) extra-prep
clean: clean-local
/bin/rm -f $(PACKAGE_MD5)
/bin/rm -fR $(PACKAGE_DIR)
/bin/rm -fR $(PACKAGE_TARNAME)
distclean: distclean-local clean
/bin/rm -f $(PACKAGE_FILE)
/bin/rm -f build/
download: $(PACKAGE_FILE)
license: $(SRCROOTDIR)/build-aux/iOSPorts-geninfo
$(SRCROOTDIR)/build-aux/iOSPorts-geninfo -f \
-o "pkgdata_$(PACKAGE_TARNAME).m" \
-N "$(PACKAGE_NAME)" \
-I "$(PACKAGE_TARNAME)" \
-R "$(PACKAGE_VERSION)" \
-w "$(PACKAGE_WEBSITE)" \
-i "$(PACKAGE_LICENSE_FILE)"
# download targets
$(PACKAGE_TARNAME): $(PACKAGE_DIR)
@/bin/rm -Rf $(PACKAGE_TARNAME)
/bin/ln -s $(PACKAGE_DIR) $(PACKAGE_TARNAME)
@/usr/bin/touch $(PACKAGE_TARNAME)
$(PACKAGE_DIR): $(PACKAGE_MD5)
@/bin/rm -Rf $(PACKAGE_DIR)
/usr/bin/tar -xzf $(PACKAGE_FILE)
@/usr/bin/touch $(PACKAGE_DIR)
$(PACKAGE_MD5): Makefile $(PACKAGE_FILE)
/sbin/md5 $(PACKAGE_FILE) > $(PACKAGE_MD5)
/usr/bin/diff $(PACKAGE_MD5) build-aux/$(PACKAGE_FILE).md5 > /dev/null \
|| { /bin/rm -f $(PACKAGE_MD5) $(PACKAGE_FILE); exit 1; };
@/usr/bin/touch $(PACKAGE_MD5)
$(PACKAGE_FILE):
/usr/bin/curl -O $(PACKAGE_URL) -o $(PACKAGE_FILE) -s \
|| { rm -f $(PACKAGE_FILE); echo "unable to download $(PACKAGE_FILE) from $(PACKAGE_URL)\nPlease verify that your system is connected to the Internet."; exit 1; };
@/usr/bin/touch $(PACKAGE_FILE)
.PHONY: extra-prep clean-local distclean-local
# end of Makefile