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.

133 lines
3.7 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.12.2
  9. PKG_SOURCE_URL:=@APACHE/subversion
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  11. PKG_HASH:=3bd0b5c8e4c5175263dc9a92fd9aef94ce917e80af034f26fe5c45fde7e0f771
  12. PKG_LICENSE:=Apache-2.0
  13. PKG_LICENSE_FILES:=LICENSE
  14. PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
  15. PKG_FIXUP:=autoreconf
  16. PKG_MACRO_PATHS:=build/ac-macros
  17. PKG_BUILD_DEPENDS:=apr-util
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. define Package/subversion/Default
  23. SECTION:=net
  24. CATEGORY:=Network
  25. SUBMENU:=Version Control Systems
  26. TITLE:=A compelling replacement for CVS
  27. DEPENDS:=+PACKAGE_unixodbc:unixodbc +libaprutil +libmagic $(ICONV_DEPENDS) $(INTL_DEPENDS)
  28. URL:=https://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. APU_LIBS=$(shell $(STAGING_DIR)/usr/bin/apu-1-config --link-libtool --libs)
  68. TARGET_LDFLAGS += $(APU_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. --with-lz4=internal \
  82. --with-utf8proc=internal
  83. ifdef $(INTL_FULL)
  84. CONFIGURE_ARGS += --enable-nls
  85. else
  86. CONFIGURE_ARGS += --disable-nls
  87. endif
  88. define Package/subversion-libs/install
  89. $(INSTALL_DIR) $(1)/usr/lib
  90. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/
  91. endef
  92. define Package/subversion-client/install
  93. $(INSTALL_DIR) $(1)/usr/bin
  94. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{svn,svnversion,svnsync} $(1)/usr/bin/
  95. endef
  96. define Package/subversion-server/install
  97. $(INSTALL_DIR) $(1)/usr/bin
  98. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svn{look,admin,dumpfilter,serve} $(1)/usr/bin/
  99. $(INSTALL_DIR) $(1)/etc/config
  100. $(INSTALL_CONF) ./files/subversion.config $(1)/etc/config/subversion
  101. $(INSTALL_DIR) $(1)/etc/init.d
  102. $(INSTALL_BIN) ./files/subversion.init $(1)/etc/init.d/subversion
  103. endef
  104. define Package/subversion-server/prerm
  105. #!/bin/sh
  106. ps | grep '\(/svnserve$\| svnserve\)' | grep -cvq grep >/dev/null && /etc/init.d/subversion stop
  107. /etc/init.d/subversion disable
  108. endef
  109. $(eval $(call BuildPackage,subversion-libs))
  110. $(eval $(call BuildPackage,subversion-client))
  111. $(eval $(call BuildPackage,subversion-server))