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.

48 lines
1.4 KiB

  1. #!/bin/bash
  2. set -exuo pipefail
  3. # ===========================
  4. # Distro
  5. # ===========================
  6. echo 7 >"${INSTPREFIX}/D_REVISION"
  7. D_REV=$(cat ${INSTPREFIX}/D_REVISION)
  8. D=""
  9. D=${INSTPREFIX}/out
  10. mkdir -p ${INSTPREFIX}/out
  11. rm -rf ${INSTPREFIX}/out/*
  12. # pep asn1c capnp cmake curl gmp llvm nettle ninja sequoia
  13. # bin include lib lib64 libexec share
  14. mkdir -p "$D"/{bin,ld,lib/pEp,share/pEp,include/pEp}
  15. # Engine and below, and libpEpAdapter
  16. cp -a ${INSTPREFIX}/lib/libpEpEngine.so "$D"/lib
  17. cp -ar ${INSTPREFIX}/libetpan/lib/libetpan.so* "$D"/lib/pEp
  18. cp -arv ${INSTPREFIX}/include/pEp/. "$D"/include/pEp
  19. cp -arv ${PEP_MACHINE_DIR}/system.db "$D"/share/pEp
  20. # Sequoia cmdline (optional above)
  21. if [ -f ${INSTPREFIX}/bin/sq ] ; then
  22. cp -a ${INSTPREFIX}/lib/libsequoia_*.so* "$D"/lib/pEp
  23. cp -a ${INSTPREFIX}/bin/sq "$D"/bin
  24. cp -a ${INSTPREFIX}/bin/sqv "$D"/bin
  25. cp -arv ${INSTPREFIX}/lib/sequoia "$D"/lib/pEp/.
  26. else
  27. cp -a ${INSTPREFIX}/lib/libsequoia_openpgp_ffi.* "$D"/lib/pEp
  28. cp -arv ${INSTPREFIX}/lib/sequoia "$D"/lib/pEp/.
  29. fi
  30. # versions
  31. cp -a ${INSTPREFIX}/*.ver "$D"
  32. find "$D"/lib -maxdepth 1 -type f -print -exec patchelf --set-rpath '$ORIGIN/pEp:$ORIGIN' {} \;
  33. find "$D"/lib/pEp -type f -print -exec patchelf --set-rpath '$ORIGIN' {} \;
  34. find "$D"/bin -type f -print -exec patchelf --set-rpath '$ORIGIN/../lib/pEp:$ORIGIN/../lib' {} \;
  35. ls -lh "$D"/*
  36. du -sch "$D"