rules 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. #!/usr/bin/make -f
  2. # -*- makefile -*-
  3. # Sample debian/rules that uses debhelper.
  4. # GNU copyright 1997 to 1999 by Joey Hess.
  5. # Uncomment this to turn on verbose mode.
  6. #export DH_VERBOSE=1
  7. # These are used for cross-compiling and for saving the configure script
  8. # from having to guess our platform (since we know it already)
  9. DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  10. DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  11. CFLAGS = -Wall -g
  12. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  13. CFLAGS += -O0
  14. else
  15. CFLAGS += -O2
  16. endif
  17. ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  18. INSTALL_PROGRAM += -s
  19. endif
  20. config.status: configure
  21. dh_testdir
  22. # Add here commands to configure the package.
  23. CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
  24. --build=$(DEB_BUILD_GNU_TYPE) \
  25. --prefix=/usr \
  26. --mandir=\$${prefix}/share/man \
  27. --infodir=\$${prefix}/share/info \
  28. --with-manualdir=\$${prefix}/share/doc/claws-mail/manual \
  29. --with-faqdir=\$${prefix}/share/doc/claws-mail/faq \
  30. --enable-openssl \
  31. --enable-gpgme \
  32. --enable-ipv6 \
  33. --enable-aspell \
  34. --enable-jpilot \
  35. --enable-ldap \
  36. --enable-spamassassin-plugin=yes \
  37. --enable-clamav-plugin=yes \
  38. --with-config-dir=.claws-mail
  39. build: build-stamp
  40. build-stamp: config.status
  41. dh_testdir
  42. # Add here commands to compile the package.
  43. $(MAKE)
  44. touch build-stamp
  45. clean:
  46. dh_testdir
  47. dh_testroot
  48. rm -f build-stamp
  49. # Add here commands to clean up after the build process.
  50. -$(MAKE) distclean
  51. ifneq "$(wildcard /usr/share/misc/config.sub)" ""
  52. cp -f /usr/share/misc/config.sub config.sub
  53. endif
  54. ifneq "$(wildcard /usr/share/misc/config.guess)" ""
  55. cp -f /usr/share/misc/config.guess config.guess
  56. endif
  57. dh_clean
  58. install: build
  59. dh_testdir
  60. dh_testroot
  61. dh_clean -k
  62. dh_installdirs
  63. # Add here commands to install the package into debian/claws-mail.
  64. $(MAKE) install DESTDIR=$(CURDIR)/debian/claws-mail
  65. rm -f $(CURDIR)/debian/claws-mail/usr/lib/claws-mail/plugins/*.a
  66. rm -f $(CURDIR)/debian/claws-mail/usr/lib/claws-mail/plugins/*.la
  67. #________________________________________[libclaws-mail-dev]__
  68. mkdir -m 755 -p $(CURDIR)/debian/libclaws-mail-dev/usr/lib/pkgconfig
  69. mv $(CURDIR)/debian/claws-mail/usr/include \
  70. $(CURDIR)/debian/libclaws-mail-dev/usr/include
  71. mv $(CURDIR)/debian/claws-mail/usr/lib/pkgconfig/claws-mail.pc \
  72. $(CURDIR)/debian/libclaws-mail-dev/usr/lib/pkgconfig
  73. #__________________________________________[claws-mail-i18n]__
  74. mkdir -m 755 -p $(CURDIR)/debian/claws-mail-i18n/usr/share/locale
  75. mv $(CURDIR)/debian/claws-mail/usr/share/locale/* \
  76. $(CURDIR)/debian/claws-mail-i18n/usr/share/locale
  77. #________________________________________[claws-mail-clamav]__
  78. mkdir -m 755 -p \
  79. $(CURDIR)/debian/claws-mail-clamav/usr/lib/claws-mail/plugins
  80. mv $(CURDIR)/debian/claws-mail/usr/lib/claws-mail/plugins/clamav* \
  81. $(CURDIR)/debian/claws-mail-clamav/usr/lib/claws-mail/plugins
  82. #__________________________________[claws-mail-dillo-viewer]__
  83. mkdir -m 755 -p \
  84. $(CURDIR)/debian/claws-mail-dillo-viewer/usr/lib/claws-mail/plugins
  85. mv $(CURDIR)/debian/claws-mail/usr/lib/claws-mail/plugins/dillo* \
  86. $(CURDIR)/debian/claws-mail-dillo-viewer/usr/lib/claws-mail/plugins
  87. #__________________________________[claws-mail-spamassassin]__
  88. mkdir -m 755 -p \
  89. $(CURDIR)/debian/claws-mail-spamassassin/usr/lib/claws-mail/plugins
  90. mv $(CURDIR)/debian/claws-mail/usr/lib/claws-mail/plugins/spamassassin* \
  91. $(CURDIR)/debian/claws-mail-spamassassin/usr/lib/claws-mail/plugins
  92. #______________________________________[claws-mail-trayicon]__
  93. mkdir -m 755 -p \
  94. $(CURDIR)/debian/claws-mail-trayicon/usr/lib/claws-mail/plugins
  95. mv $(CURDIR)/debian/claws-mail/usr/lib/claws-mail/plugins/trayicon* \
  96. $(CURDIR)/debian/claws-mail-trayicon/usr/lib/claws-mail/plugins
  97. #_______________________________________[claws-mail-pgpmime]__
  98. mkdir -m 755 -p \
  99. $(CURDIR)/debian/claws-mail-pgpmime/usr/lib/claws-mail/plugins
  100. mv $(CURDIR)/debian/claws-mail/usr/lib/claws-mail/plugins/pgpmime.* \
  101. $(CURDIR)/debian/claws-mail-pgpmime/usr/lib/claws-mail/plugins
  102. mv $(CURDIR)/debian/claws-mail/usr/lib/claws-mail/plugins/pgpcore.so \
  103. $(CURDIR)/debian/claws-mail-pgpmime/usr/lib/claws-mail/plugins
  104. #_____________________________________[claws-mail-pgpinline]__
  105. mkdir -m 755 -p \
  106. $(CURDIR)/debian/claws-mail-pgpinline/usr/lib/claws-mail/plugins
  107. mv $(CURDIR)/debian/claws-mail/usr/lib/claws-mail/plugins/pgpinline.* \
  108. $(CURDIR)/debian/claws-mail-pgpinline/usr/lib/claws-mail/plugins
  109. #_______________________________________________[claws-mail]__
  110. # application icons
  111. mkdir -m 755 -p \
  112. $(CURDIR)/debian/claws-mail/usr/share/pixmaps/
  113. cp $(CURDIR)/sylpheed*.png \
  114. $(CURDIR)/debian/claws-mail/usr/share/pixmaps/
  115. # desktop entry
  116. mkdir -m 755 -p \
  117. $(CURDIR)/debian/claws-mail/usr/share/applications
  118. cp $(CURDIR)/debian/claws-mail.desktop \
  119. $(CURDIR)/debian/claws-mail/usr/share/applications/claws-mail.desktop
  120. # Build architecture-independent files here.
  121. binary-indep: build install
  122. # We have nothing to do by default.
  123. # Build architecture-dependent files here.
  124. binary-arch: build install
  125. dh_testdir
  126. dh_testroot
  127. dh_installchangelogs ChangeLog
  128. dh_installdocs
  129. dh_installexamples
  130. dh_installman
  131. dh_installmenu
  132. dh_link
  133. dh_strip
  134. dh_compress
  135. dh_fixperms
  136. dh_installdeb
  137. dh_shlibdeps
  138. dh_gencontrol
  139. dh_md5sums
  140. dh_builddeb
  141. binary: binary-indep binary-arch
  142. .PHONY: build clean binary-indep binary-arch binary install