Add adns.
[gpg4win.git] / src / Makefile.am
index d87149a..d68dcd9 100644 (file)
 # GNU General Public License for more details.
 # 
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 
 
 EXTRA_DIST = pkg-config gpg4win.nsi gpg4win-src.nsi config.site \
         installer-options.ini.in libiconv.def libintl.def loreley.mid \
         gpg4win-splash.wav gpgwrap.c exdll.h g4wihelp.c g4wihelp.nsi \
         inst-sections.nsi installer.nsi installer-finish.nsi  \
-        qt.conf kleopatra.bat                                 \
+        qt.conf kleowrap.c potomo Memento.nsh dirmngr.conf    \
         inst-gpg4win.nsi          uninst-gpg4win.nsi         \
         inst-atk.nsi               uninst-atk.nsi            \
         inst-cairo.nsi            uninst-cairo.nsi           \
+        inst-libgsasl.nsi         uninst-libgsasl.nsi        \
+        inst-libtasn1.nsi         uninst-libtasn1.nsi        \
+        inst-opencdk.nsi          uninst-opencdk.nsi         \
+        inst-gnutls.nsi                   uninst-gnutls.nsi          \
+        inst-libetpan.nsi         uninst-libetpan.nsi        \
         inst-claws-mail.nsi       uninst-claws-mail.nsi      \
         inst-crypt.nsi            uninst-crypt.nsi           \
         inst-dirmngr.nsi          uninst-dirmngr.nsi         \
@@ -46,6 +50,7 @@ EXTRA_DIST = pkg-config gpg4win.nsi gpg4win-src.nsi config.site \
         inst-libgpg-error.nsi     uninst-libgpg-error.nsi    \
         inst-libiconv.nsi         uninst-libiconv.nsi        \
         inst-libksba.nsi          uninst-libksba.nsi         \
+        inst-adns.nsi             uninst-adns.nsi            \
         inst-libpng.nsi                   uninst-libpng.nsi          \
         inst-man_advanced_de.nsi   uninst-man_advanced_de.nsi \
         inst-man_advanced_en.nsi   uninst-man_advanced_en.nsi \
@@ -56,7 +61,6 @@ EXTRA_DIST = pkg-config gpg4win.nsi gpg4win-src.nsi config.site \
         inst-pkgconfig.nsi        uninst-pkgconfig.nsi       \
         inst-pthreads-w32.nsi     uninst-pthreads-w32.nsi    \
         inst-regex.nsi            uninst-regex.nsi           \
-        inst-sylpheed-claws.nsi           uninst-sylpheed-claws.nsi  \
         inst-w32pth.nsi                   uninst-w32pth.nsi          \
         inst-winpt.nsi            uninst-winpt.nsi           \
         inst-zlib.nsi             uninst-zlib.nsi            \
@@ -65,17 +69,18 @@ EXTRA_DIST = pkg-config gpg4win.nsi gpg4win-src.nsi config.site \
         inst-oxygen-icons.nsi             uninst-oxygen-icons.nsi    \
         inst-kdelibs.nsi          uninst-kdelibs.nsi         \
         inst-kleopatra.nsi        uninst-kleopatra.nsi       \
-       inst-bzip2.nsi             uninst-bzip2.nsi
+       inst-bzip2.nsi             uninst-bzip2.nsi           \
+        inst-final.nsi
 
 # Need to clean the dll because we bypassed automake.
 CLEANFILES = g4wihelp.dll versioninfo.txt README.en.txt README.de.txt \
-             installer-options.ini NEWS.tmp gpgwrap.exe
+             installer-options.ini NEWS.tmp gpgwrap.exe kleowrap.exe
 
 # Supported source packages.
 gpg4win_spkgs = glib gnupg libgpg-error gpgme gpgol gpgex \
-               gpa winpt sylpheed-claws \
-               claws-mail gnupg2 pinentry libassuan libksba \
-               libgcrypt dirmngr w32pth
+               gpa winpt libgsasl libtasn1 opencdk gnutls \
+                libetpan claws-mail gnupg2 pinentry \
+               libassuan libksba libgcrypt adns dirmngr w32pth
 
 # Extra options to configure for individual packages.
 # We can use $(idir) here for the installation prefix.
@@ -95,19 +100,25 @@ man -Tlatin1 -l $$$${pkgidir}/share/man/man1/gpgv.1 | \
  sed -e 's/$$$$/\r/' > $$$${pkgidir}/share/man/man1/gpgv.man; \
 man -Tlatin1 -l $$$${pkgidir}/share/man/man7/gnupg.7 | \
  sed `printf "s/_\b//g;s/\b.//g"` | \
- sed -e 's/$$$$/\r/' > $$$${pkgidir}/share/man/man7/gnupg.man; \
-for i in de; do \
- msgfmt --output-file=$$$${pkgidir}/share/gnupg/$$$${i}.mo \
-                               $$$${pkgsdir}/po/$$$${i}.po; \
- done)
+ sed -e 's/$$$$/\r/' > $$$${pkgidir}/share/man/man7/gnupg.man)
 endef
 
 
 # The fields FAQ and faq.html conflict with those in GnuPG1.
-# For now removes them.
+# For now remove them.
 define gpg4win_pkg_gnupg2_post_install 
 ( rm $$$${pkgidir}/share/gnupg/FAQ; \
-  rm $$$${pkgidir}/share/gnupg/faq.html )
+  rm $$$${pkgidir}/share/gnupg/faq.html; \
+  for i in `$(tsdir)/src/potomo --get-linguas $$$${pkgsdir}/po` ; do \
+     $(tsdir)/src/potomo $$$${pkgsdir}/po/$$$${i}.po \
+                      $$$${pkgidir}/share/gnupg/$$$${i}.mo ; \
+  done)
+endef
+
+
+# Build the reference manual.
+define gpg4win_pkg_gpgol_post_install
+( cd $$$${pkgndir}/doc; make pdf )
 endef
 
 # We would like to use --with-libiconv-prefix and
@@ -128,6 +139,8 @@ gpg4win_pkg_libksba_configure = --silent \
 gpg4win_pkg_libgcrypt_configure = --silent \
   --with-gpg-error-prefix=$(idir)
 
+gpg4win_pkg_adns_configure = --silent
+
 gpg4win_pkg_dirmngr_configure = \
   --with-gpg-error-prefix=$(idir) \
   --with-ksba-prefix=$(idir) \
@@ -153,7 +166,8 @@ gpg4win_pkg_gnupg2_configure = \
 # non-"libfoo.la" versions of iconv and gettext that we are using.
 gpg4win_pkg_pinentry_configure = \
   --disable-pinentry-gtk \
-  --enable-pinentry-gtk2 --with-glib-prefix=$(idir) --with-gtk-prefix=$(idir) \
+  --enable-pinentry-gtk2 \
+  --with-glib-prefix=$(idir) --with-gtk-prefix=$(idir) \
   --disable-pinentry-qt \
   CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib
 #  --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir)
@@ -186,26 +200,23 @@ gpg4win_pkg_gpgex_configure = --silent \
 gpg4win_pkg_winpt_configure = --silent \
   --with-gpgme-prefix=$(idir) --with-gpg-error-prefix=$(idir)
 
-gpg4win_pkg_sylpheed_claws_configure = --silent \
-  --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
-  --with-gpg-error-prefix=$(idir) --with-gpgme-prefix=$(idir) \
-  --with-config-dir="Sylpheed-claws" --disable-pthread \
-  --disable-libetpan --disable-aspell --disable-trayicon-plugin \
-  --disable-openssl --disable-dillo-viewer-plugin --disable-gnomeprint \
-  --disable-jpilot --disable-startup-notification --disable-ipv6 \
-  --disable-mathml-viewer-plugin --disable-clamav-plugin \
-  --disable-spamassassin-plugin
+gpg4win_pkg_gnutls_configure = \
+  --disable-cxx
 
-gpg4win_pkg_claws_mail_configure = --silent \
+# The CFLAGS are needed to find pthread-w32.
+gpg4win_pkg_libetpan_configure = \
+  CPPFLAGS=\"-I$(idir)/include\" LIBS=\"-L$(idir)/lib\"
+
+gpg4win_pkg_claws_mail_configure = \
   --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
   --with-gpg-error-prefix=$(idir) --with-gpgme-prefix=$(idir) \
-  --with-config-dir="Claws-mail" --disable-pthread \
-  --disable-libetpan --disable-aspell --disable-trayicon-plugin \
+  --with-config-dir="Claws-mail" --enable-pthread --enable-gnutls \
+  --enable-libetpan --disable-aspell --disable-trayicon-plugin \
   --disable-openssl --disable-dillo-viewer-plugin --disable-gnomeprint \
   --disable-jpilot --disable-startup-notification --disable-ipv6 \
   --disable-mathml-viewer-plugin --disable-clamav-plugin \
   --disable-spamassassin-plugin --disable-bogofilter-plugin \
-  --disable-valgrind
+  --disable-valgrind --disable-networkmanager-support
 
 # Supported make-only source packages.
 gpg4win_mpkgs = pthreads-w32 bzip2
@@ -274,14 +285,16 @@ endef
 
 # To make shure that we link against the static versions we need
 # remove the import libs from regex
-define gpg4win_pkg_regex_post_install
-(cd $$$${pkgidir}/lib && rm libregex.dll.a libregex.lib)
-endef
+# FIXME: We need to shared version or libtool refuses to build the
+# claws plugin.
+#define gpg4win_pkg_regex_post_install
+#(cd $$$${pkgidir}/lib && rm libregex.dll.a libregex.lib)
+#endef
 
 # We need to fix the prefix in the various packages using pkgconfig,
 # or we can't substitute it properly in our pkg-config wrapper.
 define gpg4win_pkg_glib_post_install
- (cd $$$${pkgidir_dev};                                                        \
+ (cd $$$${pkgidir};                                                    \
  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
 endef
 
@@ -392,17 +405,37 @@ README.de.txt : versioninfo.txt NEWS.tmp $(top_srcdir)/doc/README.de.txt
 # if makensis changed to the directory of the source file at startup.
 # So we have to pull a couple of strings to correct this.
 gpg4win-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
-                        g4wihelp.dll gpgwrap.exe README.en.txt README.de.txt \
-                       installer-options.ini versioninfo.txt
+                        g4wihelp.dll gpgwrap.exe kleowrap.exe README.en.txt \
+                       README.de.txt installer-options.ini versioninfo.txt
        $(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
                -DSRCDIR=$(srcdir) $(srcdir)/gpg4win.nsi
 
 gpg4win-light-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
-                        g4wihelp.dll gpgwrap.exe README.en.txt README.de.txt \
-                       installer-options.ini versioninfo.txt
+                        g4wihelp.dll gpgwrap.exe kleowrap.exe README.en.txt \
+                       README.de.txt installer-options.ini versioninfo.txt
        $(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
                -DSRCDIR=$(srcdir) -DGPG4WIN_LIGHT=1 $(srcdir)/gpg4win.nsi
 
+gpg4win-$(VERSION).wix: gpg4win.nsi $(common_nsi) stamps/stamp-final \
+                       gpgwrap.exe kleowrap.exe README.en.txt \
+                       README.de.txt versioninfo.txt
+       perl make-msi.pl --guids $(srcdir)/make-msi.guids \
+               --manifest gpg4win-$(VERSION).files \
+               -DBUILD_DIR=. -DTOP_SRCDIR=$(top_srcdir) \
+               -DSRCDIR=$(srcdir) $(srcdir)/gpg4win.nsi > $@
+
+gpg4win-light-$(VERSION).wix: gpg4win.nsi $(common_nsi) stamps/stamp-final \
+                       gpgwrap.exe kleowrap.exe README.en.txt \
+                       README.de.txt versioninfo.txt
+       perl make-msi.pl --guids $(srcdir)/make-msi.guids \
+               --manifest gpg4win-light-$(VERSION).files \
+               -DBUILD_DIR=. -DTOP_SRCDIR=$(top_srcdir) \
+               -DSRCDIR=$(srcdir) -DGPG4WIN_LIGHT=1 $(srcdir)/gpg4win.nsi > $@
+
+.PHONY: msi
+msi: gpg4win-$(VERSION).wix gpg4win-light-$(VERSION).wix
+
+
 stamps/stamp-dist-self: versioninfo.txt
        (set -e; cd ..; make dist-bzip2)
        touch stamps/stamp-dist-self
@@ -418,8 +451,12 @@ g4wihelp.dll: g4wihelp.c exdll.h
        $(STRIP) g4wihelp.dll
 
 gpgwrap.exe: gpgwrap.c
-       $(CC) -I. -I.. -DHAVE_CONFIG_H -O2 -o gpgwrap.exe $(srcdir)/gpgwrap.c 
-       $(STRIP) gpgwrap.exe
+       $(CC) -I. -I.. -DHAVE_CONFIG_H -O2 -o $@ $^
+       $(STRIP) $@
+
+kleowrap.exe: kleowrap.c
+       $(CC) -I. -I.. -DHAVE_CONFIG_H -O2 -mwindows -o $@ $^
+       $(STRIP) $@
 
 if BUILD_SOURCE_INSTALLER
 all_src = gpg4win-src-$(VERSION).exe