Makefile 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. #
  2. # Copyright (C) 2007-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=subversion
  9. PKG_RELEASE:=2
  10. PKG_VERSION:=1.9.5
  11. PKG_SOURCE_URL:=@APACHE/subversion
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_MD5SUM:=9fcbae352a5efe73d46a88c97c6bba14
  14. PKG_LICENSE:=Apache-2.0
  15. PKG_LICENSE_FILES:=LICENSE
  16. PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
  17. PKG_FIXUP:=autoreconf
  18. PKG_MACRO_PATHS:=build/ac-macros
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. define Package/subversion/Default
  22. SECTION:=net
  23. CATEGORY:=Network
  24. SUBMENU:=Version Control Systems
  25. TITLE:=A compelling replacement for CVS
  26. DEPENDS:=+zlib +libsqlite3 +PACKAGE_unixodbc:unixodbc +libapr +libaprutil +libmagic \
  27. $(ICONV_DEPENDS) $(INTL_DEPENDS)
  28. URL:=http://subversion.apache.org/
  29. endef
  30. define Package/subversion/Default/description
  31. Subversion is a free/open-source version control system. That is,
  32. Subversion manages files and directories, and the changes made to them,
  33. over time. This allows you to recover older versions of your data, or
  34. examine the history of how your data changed. In this regard, many
  35. people think of a version control system as a sort of time machine.
  36. endef
  37. define Package/subversion-libs
  38. $(call Package/subversion/Default)
  39. TITLE:=subversion libs
  40. endef
  41. define Package/subversion-libs/description
  42. $(call Package/subversion/Default/description)
  43. This package contains the Subversion libraries.
  44. endef
  45. define Package/subversion-client
  46. $(call Package/subversion/Default)
  47. DEPENDS:=+subversion-libs
  48. TITLE:=subversion client tools
  49. endef
  50. define Package/subversion-client/description
  51. $(call Package/subversion/Default/description)
  52. This package contains the Subversion client tools.
  53. endef
  54. define Package/subversion-server
  55. $(call Package/subversion/Default)
  56. DEPENDS:=+subversion-libs
  57. TITLE:=subversion server
  58. endef
  59. define Package/subversion-server/description
  60. $(call Package/subversion/Default/description)
  61. This package contains the Subversion server.
  62. endef
  63. define Package/subversion-server/conffiles
  64. /etc/config/subversion
  65. endef
  66. TARGET_CFLAGS += $(FPIC)
  67. TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
  68. APU_LIBS=$(shell $(STAGING_DIR)/usr/bin/apu-1-config --link-libtool --libs)
  69. CONFIGURE_ARGS += \
  70. --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
  71. --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
  72. --with-libmagic="$(STAGING_DIR)/usr" \
  73. --disable-mod-activation \
  74. --without-ruby-sitedir \
  75. --without-swig \
  76. --without-jikes \
  77. --without-junit \
  78. --without-berkeley-db \
  79. --without-apxs \
  80. --without-sasl
  81. ifdef $(INTL_FULL)
  82. CONFIGURE_ARGS += --enable-nls
  83. else
  84. CONFIGURE_ARGS += --disable-nls
  85. endif
  86. CONFIGURE_VARS += \
  87. LDFLAGS="$(TARGET_LDFLAGS) $(APU_LIBS) -lcrypt -lm \
  88. -lz -lpthread $(if $(INTL_FULL),-lintl)"
  89. CPPFLAGS="$(TARGET_CPPFLAGS)"
  90. define Build/Compile
  91. $(MAKE) -C $(PKG_BUILD_DIR) \
  92. DESTDIR="$(PKG_INSTALL_DIR)" \
  93. all local-install
  94. endef
  95. define Package/subversion-libs/install
  96. $(INSTALL_DIR) $(1)/usr/lib
  97. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/
  98. endef
  99. define Package/subversion-client/install
  100. $(INSTALL_DIR) $(1)/usr/bin
  101. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{svn,svnversion,svnsync} $(1)/usr/bin/
  102. endef
  103. define Package/subversion-server/install
  104. $(INSTALL_DIR) $(1)/usr/bin
  105. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svn{look,admin,dumpfilter,serve} $(1)/usr/bin/
  106. $(INSTALL_DIR) $(1)/etc/config
  107. $(INSTALL_CONF) ./files/subversion.config $(1)/etc/config/subversion
  108. $(INSTALL_DIR) $(1)/etc/init.d
  109. $(INSTALL_BIN) ./files/subversion.init $(1)/etc/init.d/subversion
  110. endef
  111. define Package/subversion-server/prerm
  112. #!/bin/sh
  113. ps | grep '\(/svnserve$\| svnserve\)' | grep -cvq grep >/dev/null && /etc/init.d/subversion stop
  114. /etc/init.d/subversion disable
  115. endef
  116. $(eval $(call BuildPackage,subversion-libs))
  117. $(eval $(call BuildPackage,subversion-client))
  118. $(eval $(call BuildPackage,subversion-server))