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.

134 lines
3.8 KiB

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