2 GNUTLS_FILE
:=gnutls-
$(GNUTLS_VERSION
).
tar.xz
3 GNUTLS_DIR
:=gnutls-
$(GNUTLS_VERSION
)
5 GMP_FILE
:=gmp-5.0
.5.
tar.bz2
8 P11_KIT_FILE
:=p11-kit-0.14.
tar.gz
9 P11_KIT_DIR
:=p11-kit-0.14
11 NETTLE_FILE
:=nettle-2.5.
tar.gz
12 NETTLE_DIR
:=nettle-2.5
14 CROSS_DIR
:=$(PWD
)/win32
15 BIN_DIR
:=$(CROSS_DIR
)/bin
16 LIB_DIR
:=$(CROSS_DIR
)/lib
17 HEADERS_DIR
:=$(CROSS_DIR
)/include
18 DEVCPP_DIR
:=$(PWD
)/devcpp
20 all: update-gpg-keys gnutls-w32
22 upload
: gnutls-w32 devpak
23 ..
/build-aux
/gnupload
--to ftp.gnu.org
:gnutls
/w32
$(GNUTLS_DIR
)-w32.zip
24 ..
/build-aux
/gnupload
--to ftp.gnu.org
:gnutls
/w32 gnutls-
$(GNUTLS_VERSION
)-1gn.DevPak
27 gpg
--recv-keys
96865171 B565716F D92765AF A8F4C2FD DB899F46
29 $(GNUTLS_DIR
)-w32.zip
: $(LIB_DIR
) $(BIN_DIR
) $(GNUTLS_DIR
)/.installed
30 rm -rf
$(CROSS_DIR
)/etc
$(CROSS_DIR
)/share
$(CROSS_DIR
)/lib
/include $(CROSS_DIR
)/lib
/pkgconfig
31 cd
$(CROSS_DIR
) && zip
-r
$(PWD
)/$@
*
32 gpg
--sign
--detach
$(GNUTLS_DIR
)-w32.zip
34 gnutls-
$(GNUTLS_VERSION
)-1gn.DevPak
: $(GNUTLS_DIR
)-w32.zip devcpp.
tar
36 mkdir
-p
$(DEVCPP_DIR
)
37 cd
$(DEVCPP_DIR
) && unzip ..
/$(GNUTLS_DIR
)-w32.zip
38 cd
$(DEVCPP_DIR
) && tar xf ..
/devcpp.
tar && sed
-i
's/@VERSION@/$(GNUTLS_VERSION)/g' gnutls.DevPackage
39 cd
$(DEVCPP_DIR
) && tar -cjf ..
/$@ .
41 devpak
: gnutls-
$(GNUTLS_VERSION
)-1gn.DevPak
43 gnutls-w32
: $(GNUTLS_DIR
)-w32.zip
45 nettle
: $(NETTLE_DIR
)/.installed
47 gmp
: $(GMP_DIR
)/.installed
55 CONFIG_FLAGS
:= --prefix=$(CROSS_DIR
) --host
=i686-w64-mingw32
--enable-shared
--disable-static
--bindir=$(BIN_DIR
) --libdir=$(LIB_DIR
) --includedir=$(HEADERS_DIR
)
57 $(P11_KIT_DIR
)/.configured
:
58 test -f
$(P11_KIT_FILE
) || wget http
://p11-glue.freedesktop.org
/releases
/$(P11_KIT_FILE
)
59 test -f
$(P11_KIT_FILE
).sig || wget http
://p11-glue.freedesktop.org
/releases
/$(P11_KIT_FILE
).sig
60 gpg
--verify
$(P11_KIT_FILE
).sig
61 test -d
$(P11_KIT_DIR
) ||
tar -xf
$(P11_KIT_FILE
)
62 cd
$(P11_KIT_DIR
) && .
/configure
$(CONFIG_FLAGS
) && cd ..
65 $(P11_KIT_DIR
)/.installed
: $(P11_KIT_DIR
)/.configured
66 make
-C
$(P11_KIT_DIR
) -j2
67 make
-C
$(P11_KIT_DIR
) install -i
68 -rm -rf
$(HEADERS_DIR
)/p11-kit
69 -mv
$(HEADERS_DIR
)/p11-kit-1
/p11-kit
$(HEADERS_DIR
)
70 -rm -rf
$(HEADERS_DIR
)/p11-kit-1
71 rm -f
$(BIN_DIR
)/p11-kit.exe
74 $(GMP_DIR
)/.configured
:
75 test -f
$(GMP_FILE
) || wget ftp
://ftp.gmplib.org
/pub
/$(GMP_DIR
)/$(GMP_FILE
)
76 test -f
$(GMP_FILE
).sig || wget ftp
://ftp.gmplib.org
/pub
/$(GMP_DIR
)/$(GMP_FILE
).sig
77 gpg
--verify
$(GMP_FILE
).sig
78 test -d
$(GMP_DIR
) ||
tar -xf
$(GMP_FILE
)
79 cd
$(GMP_DIR
) && .
/configure
$(CONFIG_FLAGS
) --enable-fat
--exec-prefix
=$(LIB_DIR
) --oldincludedir=$(HEADERS_DIR
) && cd ..
82 $(GMP_DIR
)/.installed
: $(GMP_DIR
)/.configured
83 make
-C
$(GMP_DIR
) -j2
84 make
-C
$(GMP_DIR
) install -i
85 mv
$(LIB_DIR
)/include/* $(HEADERS_DIR
)/
86 rmdir
$(LIB_DIR
)/include/
89 $(NETTLE_DIR
)/.configured
: $(GMP_DIR
)/.installed
90 test -f
$(NETTLE_FILE
) || wget http
://www.lysator.liu.se
/~nisse
/archive
/$(NETTLE_FILE
)
91 test -f
$(NETTLE_FILE
).sig || wget http
://www.lysator.liu.se
/~nisse
/archive
/$(NETTLE_FILE
).sig
92 gpg
--verify
$(NETTLE_FILE
).sig
93 test -d
$(NETTLE_DIR
) ||
tar -xf
$(NETTLE_FILE
)
94 cd
$(NETTLE_DIR
) && CFLAGS
="-I$(HEADERS_DIR)" CXXFLAGS
="-I$(HEADERS_DIR)" .
/configure
$(CONFIG_FLAGS
) --with-lib-path
=$(LIB_DIR
) && cd ..
97 #nettle messes up installation
98 $(NETTLE_DIR
)/.installed
: $(NETTLE_DIR
)/.configured
99 make
-C
$(NETTLE_DIR
) -j2
100 make
-C
$(NETTLE_DIR
) install -i
101 rm -f
$(LIB_DIR
)/libnettle.a
$(LIB_DIR
)/libhogweed.a
$(BIN_DIR
)/nettle-hash.exe
$(BIN_DIR
)/nettle-lfib-stream.exe
$(BIN_DIR
)/pkcs1-conv.exe
$(BIN_DIR
)/sexp-conv.exe
102 cp
$(NETTLE_DIR
)/libnettle.dll.a
$(NETTLE_DIR
)/libhogweed.dll.a
$(LIB_DIR
)/
103 cp
$(NETTLE_DIR
)/libnettle
*.dll
$(NETTLE_DIR
)/libhogweed
*.dll
$(BIN_DIR
)/
106 $(GNUTLS_DIR
)/.installed
: $(GNUTLS_DIR
)/.configured
107 make
-C
$(GNUTLS_DIR
) -j2
108 make
-C
$(GNUTLS_DIR
) install -i
109 cp
$(GNUTLS_DIR
)/COPYING
$(GNUTLS_DIR
)/COPYING.LESSER
$(CROSS_DIR
)
112 $(GNUTLS_DIR
)/.configured
: $(NETTLE_DIR
)/.installed
$(P11_KIT_DIR
)/.installed
113 test -f
$(GNUTLS_FILE
) || wget ftp
://ftp.gnu.org
/gnu
/gnutls
/$(GNUTLS_FILE
)
114 test -f
$(GNUTLS_FILE
).sig || wget ftp
://ftp.gnu.org
/gnu
/gnutls
/$(GNUTLS_FILE
).sig
115 gpg
--verify
$(GNUTLS_FILE
).sig
116 test -d
$(GNUTLS_DIR
) ||
tar -xf
$(GNUTLS_FILE
)
117 cd
$(GNUTLS_DIR
) && \
118 P11_KIT_CFLAGS
="-I$(HEADERS_DIR)" \
119 P11_KIT_LIBS
="$(LIB_DIR)/libp11-kit.la" \
120 LDFLAGS
="-L$(LIB_DIR)" CFLAGS
="-I$(HEADERS_DIR)" CXXFLAGS
="-I$(HEADERS_DIR)" \
121 .
/configure
$(CONFIG_FLAGS
) --enable-local-libopts
--with-libnettle-prefix
=$(LIB_DIR
) \
122 --disable-libdane
--disable-openssl-compatibility
--with-included-libtasn1
&& cd ..
126 rm -rf
$(CROSS_DIR
) $(GNUTLS_DIR
)/.installed
$(NETTLE_DIR
)/.installed
$(GMP_DIR
)/.installed
$(P11_KIT_DIR
)/.installed
129 rm -rf
$(CROSS_DIR
) $(GNUTLS_DIR
) $(NETTLE_DIR
) $(GMP_DIR
) $(P11_KIT_DIR
)