diff options
-rw-r--r-- | .SRCINFO | 59 | ||||
-rw-r--r-- | PKGBUILD | 92 | ||||
-rw-r--r-- | seiscomp-sysusers.conf | 2 | ||||
-rw-r--r-- | seiscomp-tmpfiles.conf | 2 | ||||
-rw-r--r-- | seiscomp.install | 18 | ||||
-rw-r--r-- | seiscomp.sh | 5 |
6 files changed, 178 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..dd282fe00339 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,59 @@ +pkgbase = seiscomp-git + pkgdesc = A seismological software for data acquisition, processing, distribution and interactive analysis (GitHub version). + pkgver = 4.8.2.r0.g36dc05e + pkgrel = 1 + url = https://github.com/SeisComP + install = seiscomp.install + arch = x86_64 + license = AGPL3 + makedepends = boost + makedepends = cmake + makedepends = gcc-fortran + makedepends = git + makedepends = libmariadbclient + makedepends = python-myst-parser + makedepends = python-sphinx + makedepends = postgresql-libs + depends = boost-libs + depends = inetutils + depends = libxml2 + depends = mariadb + depends = ncurses + depends = openssl + depends = python + depends = python-dateutil + depends = python-numpy + depends = python-twisted + depends = qt5-base + depends = qt5-svg + depends = sqlite + optdepends = seiscomp-maps: for SeisComp default map files + optdepends = postgresql: for using PostgreSQL database + provides = seiscomp + provides = seiscomp-docs + conflicts = seiscomp + conflicts = seiscomp-docs + source = seiscomp::git+https://github.com/SeisComP/seiscomp.git + source = seiscomp-seedlink::git+https://github.com/SeisComP/seedlink.git + source = seiscomp-common::git+https://github.com/SeisComP/common.git + source = seiscomp-main::git+https://github.com/SeisComP/main.git + source = seiscomp-extras::git+https://github.com/SeisComP/extras.git + source = seiscomp-contrib-gns::git+https://github.com/SeisComP/contrib-gns.git + source = seiscomp-contrib-ipgp::git+https://github.com/SeisComP/contrib-ipgp.git + source = seiscomp-contrib-sed::git+https://github.com/SeisComP/contrib-sed.git + source = seiscomp.sh + source = seiscomp-sysusers.conf + source = seiscomp-tmpfiles.conf + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = e8195d8cebe4a134d6054fb3cbf6fea9e5284d96192c957c9079059e4b463016 + sha256sums = 4cdce628264921efa947ddccba19cf5fd2d6af21a9b23e6fbe8972558a27f182 + sha256sums = 312911098291e60a40d4f3fd455b9a40b2d9b3489a589fb927fb6fc0b9ac2dd2 + +pkgname = seiscomp-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..93ec9eb8e770 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,92 @@ +# Maintainer: Mohammadreza Abdollahzadeh <morealaz at gmail dot com> +pkgname=seiscomp-git +pkgver=4.8.2.r0.g36dc05e +pkgrel=1 +pkgdesc="A seismological software for data acquisition, processing, distribution and interactive analysis (GitHub version)." +arch=('x86_64') +url="https://github.com/SeisComP" +license=('AGPL3') +depends=('boost-libs' 'inetutils' 'libxml2' 'mariadb' 'ncurses' 'openssl' 'python' 'python-dateutil' 'python-numpy' 'python-twisted' 'qt5-base' 'qt5-svg' 'sqlite') +makedepends=('boost' 'cmake' 'gcc-fortran' 'git' 'libmariadbclient' 'python-myst-parser' 'python-sphinx' 'postgresql-libs') +optdepends=("${pkgname%-git}-maps: for SeisComp default map files" + "postgresql: for using PostgreSQL database") +provides=("${pkgname%-git}" "${pkgname%-git}-docs") +conflicts=("${pkgname%-git}" "${pkgname%-git}-docs") +install="${pkgname%-git}.install" +source=("${pkgname%-git}::git+${url}/seiscomp.git" + "${pkgname%-git}-seedlink::git+${url}/seedlink.git" + "${pkgname%-git}-common::git+${url}/common.git" + "${pkgname%-git}-main::git+${url}/main.git" + "${pkgname%-git}-extras::git+${url}/extras.git" + "${pkgname%-git}-contrib-gns::git+${url}/contrib-gns.git" + "${pkgname%-git}-contrib-ipgp::git+${url}/contrib-ipgp.git" + "${pkgname%-git}-contrib-sed::git+${url}/contrib-sed.git" + "${pkgname%-git}.sh" + "${pkgname%-git}-sysusers.conf" + "${pkgname%-git}-tmpfiles.conf") +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'e8195d8cebe4a134d6054fb3cbf6fea9e5284d96192c957c9079059e4b463016' + '4cdce628264921efa947ddccba19cf5fd2d6af21a9b23e6fbe8972558a27f182' + '312911098291e60a40d4f3fd455b9a40b2d9b3489a589fb927fb6fc0b9ac2dd2') +scmodules=('seedlink' 'common' 'main' 'extras' 'contrib-gns' 'contrib-ipgp' 'contrib-sed') + +pkgver() { + cd "${pkgname%-git}" + git describe --long --tags $(git rev-list --tags --max-count=1) \ + | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + for scmod in "${scmodules[@]}" + do + mv "${pkgname%-git}-${scmod}" "${pkgname%-git}/src/base/${scmod}" + done + sed -i 's/m2r/myst_parser/g' "${pkgname%-git}/doc/templates/conf.py" + sed -i 's/\(source_suffix =\).*/\1 ['\''.rst'\'', '\''.md'\'' ]/g' "${pkgname%-git}/doc/templates/conf.py" + sed -i 's|/base/changelog|changelog </base/CHANGELOG>|g' "${pkgname%-git}/doc/templates/index.rst" + sed -i '1s/^/```{_sc-changelog:}\n```\n/' "${pkgname%-git}/CHANGELOG.md" + sed -i 's|pdf/SeisComP.pdf|pdf/latex/SeisComP.pdf|g' "${pkgname%-git}/doc/CMakeLists.txt" +} + +build() { + cd "${pkgname%-git}" + mkdir build + cd build + cmake .. \ + -DCMAKE_INSTALL_PREFIX='/opt/seiscomp' \ + -DCMAKE_CXX_FLAGS='-fPIC' \ + -DCMAKE_SHARED_LINKER_FLAGS='-fPIC' \ + -DCMAKE_EXE_LINKER_FLAGS='-fPIC -lpthread' \ + -DPYTHON_EXECUTABLE='/usr/bin/python3' \ + -DSC_GLOBAL_PYTHON_WRAPPER_PYTHON3='ON' \ + -DSC_ENABLE_CONTRIB='ON' \ + -DSC_GLOBAL_GUI='ON' \ + -DSC_GLOBAL_GUI_QT5='ON' \ + -DSC_DOC_GENERATE='ON' \ + -DSC_DOC_GENERATE_HTML='ON' \ + -DSC_DOC_GENERATE_MAN='ON' + #-DSC_DOC_GENERATE_PDF='ON' + make +} + +package() { + cd "${pkgname%-git}/build" + make DESTDIR="${pkgdir}/" install + install -D -m 644 "../src/system/apps/${pkgname%-git}/share/shell-completion/${pkgname%-git}.bash" \ + "${pkgdir}/usr/share/bash-completion/completions/${pkgname%-git}" + install -D -m 644 "../src/system/apps/${pkgname%-git}/share/shell-completion/${pkgname%-git}.fish" \ + "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname%-git}.fish" + cd ${srcdir} + install -D -t "${pkgdir}/etc/profile.d/" -m 755 "${pkgname%-git}.sh" + install -D -m 644 "${pkgname%-git}-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/${pkgname%-git}.conf" + install -D -m 644 "${pkgname%-git}-tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname%-git}.conf" + chmod -R g+w "${pkgdir}/opt/${pkgname%-git}" +} +# vim:set ts=4 sw=4 et: diff --git a/seiscomp-sysusers.conf b/seiscomp-sysusers.conf new file mode 100644 index 000000000000..aa2bd0ef43c0 --- /dev/null +++ b/seiscomp-sysusers.conf @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u seiscomp - "SeisComp" - - diff --git a/seiscomp-tmpfiles.conf b/seiscomp-tmpfiles.conf new file mode 100644 index 000000000000..1b3c521a43fb --- /dev/null +++ b/seiscomp-tmpfiles.conf @@ -0,0 +1,2 @@ +#Type Path Mode User Group Age Argument +Z /opt/seiscomp - seiscomp seiscomp - - diff --git a/seiscomp.install b/seiscomp.install new file mode 100644 index 000000000000..f626407ee9d4 --- /dev/null +++ b/seiscomp.install @@ -0,0 +1,18 @@ +post_install() { + find opt/seiscomp -type d \ + -exec setfacl -d -m g::rwX '{}' \; \ + -exec chmod g+s '{}' \; + + echo " ->----------------------------------------------------------------<-" + echo " -> Before using seiscomp for first time you need to do following:" + echo " -> - Add your user to 'seiscomp' group:" + echo " -> sudo gpasswd -a $USERNAME seiscomp" + echo " -> - Restart your system or logout and login again." + echo " ->----------------------------------------------------------------<-" +} + +post_upgrade() { + find opt/seiscomp -type d \ + -exec setfacl -d -m g::rwX '{}' \; \ + -exec chmod g+s '{}' \; +} diff --git a/seiscomp.sh b/seiscomp.sh new file mode 100644 index 000000000000..a4b887e36304 --- /dev/null +++ b/seiscomp.sh @@ -0,0 +1,5 @@ +export SEISCOMP_ROOT="/opt/seiscomp" +export PATH="${PATH}:${SEISCOMP_ROOT}/bin" +export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${SEISCOMP_ROOT}/lib" +export PYTHONPATH="${PYTHONPATH}:${SEISCOMP_ROOT}/lib/python" +export MANPATH="${MANPATH}:${SEISCOMP_ROOT}/share/man" |