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.

145 lines
4.1 KiB

  1. #
  2. # Copyright (C) 2007-2017 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.11.0
  11. PKG_SOURCE_URL:=@APACHE/subversion
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_HASH:=87c44344b074ac2e9ed7ca9675fb1e5b197051c3deecfe5934e5f6aefbf83e56
  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. PKG_BUILD_DEPENDS:=apr-util
  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:=+zlib +libsqlite3 +PACKAGE_unixodbc:unixodbc +libapr +libaprutil +libmagic \
  28. $(ICONV_DEPENDS) $(INTL_DEPENDS)
  29. URL:=http://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. TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
  69. APU_LIBS=$(shell $(STAGING_DIR)/usr/bin/apu-1-config --link-libtool --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. CONFIGURE_VARS += \
  90. LDFLAGS="$(TARGET_LDFLAGS) $(APU_LIBS) -lcrypt -lm \
  91. -lz -lpthread $(if $(INTL_FULL),-lintl)"
  92. CPPFLAGS="$(TARGET_CPPFLAGS)"
  93. define Build/Compile
  94. $(MAKE) -C $(PKG_BUILD_DIR) \
  95. DESTDIR="$(PKG_INSTALL_DIR)" \
  96. all local-install
  97. endef
  98. define Package/subversion-libs/install
  99. $(INSTALL_DIR) $(1)/usr/lib
  100. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/
  101. endef
  102. define Package/subversion-client/install
  103. $(INSTALL_DIR) $(1)/usr/bin
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{svn,svnversion,svnsync} $(1)/usr/bin/
  105. endef
  106. define Package/subversion-server/install
  107. $(INSTALL_DIR) $(1)/usr/bin
  108. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svn{look,admin,dumpfilter,serve} $(1)/usr/bin/
  109. $(INSTALL_DIR) $(1)/etc/config
  110. $(INSTALL_CONF) ./files/subversion.config $(1)/etc/config/subversion
  111. $(INSTALL_DIR) $(1)/etc/init.d
  112. $(INSTALL_BIN) ./files/subversion.init $(1)/etc/init.d/subversion
  113. endef
  114. define Package/subversion-server/prerm
  115. #!/bin/sh
  116. ps | grep '\(/svnserve$\| svnserve\)' | grep -cvq grep >/dev/null && /etc/init.d/subversion stop
  117. /etc/init.d/subversion disable
  118. endef
  119. $(eval $(call BuildPackage,subversion-libs))
  120. $(eval $(call BuildPackage,subversion-client))
  121. $(eval $(call BuildPackage,subversion-server))