You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
3.9 KiB

  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:=1
  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 +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. CONFIGURE_ARGS += \
  69. --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
  70. --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
  71. --with-libmagic="$(STAGING_DIR)/usr" \
  72. --disable-mod-activation \
  73. --without-ruby-sitedir \
  74. --without-swig \
  75. --without-jikes \
  76. --without-junit \
  77. --without-berkeley-db \
  78. --without-apxs \
  79. --without-sasl
  80. ifdef $(INTL_FULL)
  81. CONFIGURE_ARGS += --enable-nls
  82. else
  83. CONFIGURE_ARGS += --disable-nls
  84. endif
  85. CONFIGURE_VARS += \
  86. LDFLAGS="$(TARGET_LDFLAGS) -lcrypt -lm \
  87. -lz -lpthread $(if $(INTL_FULL),-lintl)"
  88. CPPFLAGS="$(TARGET_CPPFLAGS)"
  89. define Build/Compile
  90. $(MAKE) -C $(PKG_BUILD_DIR) \
  91. DESTDIR="$(PKG_INSTALL_DIR)" \
  92. all local-install
  93. endef
  94. define Package/subversion-libs/install
  95. $(INSTALL_DIR) $(1)/usr/lib
  96. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/
  97. endef
  98. define Package/subversion-client/install
  99. $(INSTALL_DIR) $(1)/usr/bin
  100. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{svn,svnversion,svnsync} $(1)/usr/bin/
  101. endef
  102. define Package/subversion-server/install
  103. $(INSTALL_DIR) $(1)/usr/bin
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svn{look,admin,dumpfilter,serve} $(1)/usr/bin/
  105. $(INSTALL_DIR) $(1)/etc/config
  106. $(INSTALL_CONF) ./files/subversion.config $(1)/etc/config/subversion
  107. $(INSTALL_DIR) $(1)/etc/init.d
  108. $(INSTALL_BIN) ./files/subversion.init $(1)/etc/init.d/subversion
  109. endef
  110. define Package/subversion-server/prerm
  111. #!/bin/sh
  112. ps | grep '\(/svnserve$\| svnserve\)' | grep -cvq grep >/dev/null && /etc/init.d/subversion stop
  113. /etc/init.d/subversion disable
  114. endef
  115. $(eval $(call BuildPackage,subversion-libs))
  116. $(eval $(call BuildPackage,subversion-client))
  117. $(eval $(call BuildPackage,subversion-server))