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.

144 lines
4.0 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.10.0
  11. PKG_SOURCE_URL:=@APACHE/subversion
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_HASH:=2cf23f3abb837dea0585a6b0ebd70e80e01f95bddef7c1aa097c18e3eaa6b584
  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. --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. CONFIGURE_VARS += \
  89. LDFLAGS="$(TARGET_LDFLAGS) $(APU_LIBS) -lcrypt -lm \
  90. -lz -lpthread $(if $(INTL_FULL),-lintl)"
  91. CPPFLAGS="$(TARGET_CPPFLAGS)"
  92. define Build/Compile
  93. $(MAKE) -C $(PKG_BUILD_DIR) \
  94. DESTDIR="$(PKG_INSTALL_DIR)" \
  95. all local-install
  96. endef
  97. define Package/subversion-libs/install
  98. $(INSTALL_DIR) $(1)/usr/lib
  99. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/
  100. endef
  101. define Package/subversion-client/install
  102. $(INSTALL_DIR) $(1)/usr/bin
  103. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{svn,svnversion,svnsync} $(1)/usr/bin/
  104. endef
  105. define Package/subversion-server/install
  106. $(INSTALL_DIR) $(1)/usr/bin
  107. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svn{look,admin,dumpfilter,serve} $(1)/usr/bin/
  108. $(INSTALL_DIR) $(1)/etc/config
  109. $(INSTALL_CONF) ./files/subversion.config $(1)/etc/config/subversion
  110. $(INSTALL_DIR) $(1)/etc/init.d
  111. $(INSTALL_BIN) ./files/subversion.init $(1)/etc/init.d/subversion
  112. endef
  113. define Package/subversion-server/prerm
  114. #!/bin/sh
  115. ps | grep '\(/svnserve$\| svnserve\)' | grep -cvq grep >/dev/null && /etc/init.d/subversion stop
  116. /etc/init.d/subversion disable
  117. endef
  118. $(eval $(call BuildPackage,subversion-libs))
  119. $(eval $(call BuildPackage,subversion-client))
  120. $(eval $(call BuildPackage,subversion-server))