app.spec.in 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Summary: %APP_NAME% gateway
  2. Name: %APP_NAME%
  3. Version: stable
  4. Release: l
  5. License: user EULA
  6. Source: %APP_NAME%-%VERSION%.tgz
  7. Group: autocareai/gateway
  8. BuildRoot: /tmp
  9. %define __debug_install_post \
  10. %{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
  11. %{nil}
  12. %description
  13. %prep
  14. %setup -c
  15. %install
  16. echo %VERSION%
  17. mkdir -p ${RPM_BUILD_ROOT}/opt/%APP_NAME%/bin
  18. install ./%APP_NAME% ${RPM_BUILD_ROOT}/opt/%APP_NAME%/bin
  19. mkdir -p ${RPM_BUILD_ROOT}/etc/init.d/
  20. install ./sh/app ${RPM_BUILD_ROOT}/etc/init.d/%APP_NAME%
  21. mkdir -p ${RPM_BUILD_ROOT}/etc/%APP_NAME%/lib/
  22. install ./sh/init-multi-mode ${RPM_BUILD_ROOT}/etc/%APP_NAME%/lib/
  23. install ./sh/start-stop-functions ${RPM_BUILD_ROOT}/etc/%APP_NAME%/lib/
  24. mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/
  25. install ./conf/%APP_NAME%.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/
  26. %files
  27. /opt/%APP_NAME%/bin/%APP_NAME%
  28. /etc/init.d/%APP_NAME%
  29. /etc/%APP_NAME%/lib/start-stop-functions
  30. /etc/%APP_NAME%/lib/init-multi-mode
  31. /usr/lib/systemd/system/%APP_NAME%.service
  32. %post
  33. #systemctl start %APP_NAME%
  34. #systemctl enable %APP_NAME%