t_dp_dw_datax_3_hook_dqc.spec 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. Name: t_dp_dw_datax_3_hook_dqc
  2. Packager:xiafei.qiuxf
  3. Version:2014122220.3
  4. Release: 1
  5. Summary: datax 3 dqc hook
  6. URL: http://gitlab.alibaba-inc.com/datax/datax
  7. Group: t_dp
  8. License: Commercial
  9. BuildArch: noarch
  10. %define __os_install_post %{nil}
  11. %description
  12. CodeUrl: http://gitlab.alibaba-inc.com/datax/datax
  13. datax dqc hook
  14. %{_svn_path}
  15. %{_svn_revision}
  16. %define _prefix /home/admin/datax3/hook/dqc
  17. %prep
  18. export LANG=zh_CN.UTF-8
  19. %pre
  20. grep -q "^cug-tbdp:" /etc/group &>/dev/null || groupadd -g 508 cug-tbdp &>/dev/null || true
  21. grep -q "^taobao:" /etc/passwd &>/dev/null || useradd -u 503 -g cug-tbdp taobao &>/dev/null || true
  22. %build
  23. BASE_DIR="${OLDPWD}/../"
  24. cd ${BASE_DIR}/
  25. #/home/ads/tools/apache-maven-3.0.3/bin/
  26. mvn install -N
  27. #/home/ads/tools/apache-maven-3.0.3/bin/
  28. mvn install -pl common -DskipTests
  29. cd ${BASE_DIR}/dqchook
  30. #/home/ads/tools/apache-maven-3.0.3/bin/
  31. mvn clean package -DskipTests assembly:assembly
  32. cd ${BASE_DIR}
  33. %install
  34. BASE_DIR="${OLDPWD}/../"
  35. mkdir -p .%{_prefix}
  36. cp -r ${BASE_DIR}/dqchook/target/datax/hook/dqc/* .%{_prefix}/
  37. %post
  38. chmod -R 0755 %{_prefix}
  39. %files
  40. %defattr(755,admin,cug-tbdp)
  41. %config(noreplace) %{_prefix}/dqc.properties
  42. %{_prefix}