Created
November 19, 2016 23:09
-
-
Save anonymous/6815d54584a9c228590a89fd93409837 to your computer and use it in GitHub Desktop.
Split package for CLion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Michael Hansen <zrax0111 gmail com> | |
# Contributor: Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> | |
# Contributor: Jesse Jaara <gmail.com: jesse.jaara> | |
pkgbase=clion | |
pkgname=('clion-jre' 'clion-cmake' 'clion-gdb' 'clion-lldb' 'clion') | |
_pkgname=clion | |
_archname=CLion | |
pkgver=2016.2.3 | |
pkgrel=1 | |
epoch=1 | |
arch=('x86_64') | |
options=(!strip) | |
url="http://www.jetbrains.com/${_pkgname}" | |
license=('custom') | |
source=("https://download.jetbrains.com/cpp/${_archname}-${pkgver}.tar.gz") | |
sha256sums=('0d2fc6ecec4dfab15ba98021ed3d3e866c2d43e7c27b7e522e0161e76aa78fbd') | |
package_clion-jre() { | |
pkgdesc="CLion's JRE" | |
depends=('clion') | |
mkdir -p "${pkgdir}/opt/${_pkgname}/" | |
cp -r "${srcdir}/${_pkgname}-${pkgver}/jre" "${pkgdir}/opt/${_pkgname}/jre" | |
} | |
package_clion-cmake() { | |
pkgdesc="CLion's CMake" | |
depends=('clion') | |
mkdir -p "${pkgdir}/opt/${_pkgname}/bin/" | |
cp -r "${srcdir}/${_pkgname}-${pkgver}/bin/cmake" "${pkgdir}/opt/${_pkgname}/bin/cmake" | |
} | |
package_clion-gdb() { | |
pkgdesc="CLion's GDB" | |
depends=('clion') | |
mkdir -p "${pkgdir}/opt/${_pkgname}/bin/" | |
cp -r "${srcdir}/${_pkgname}-${pkgver}/bin/gdb" "${pkgdir}/opt/${_pkgname}/bin/gdb" | |
} | |
package_clion-lldb() { | |
pkgdesc="CLion's LLDB" | |
depends=('clion') | |
mkdir -p "${pkgdir}/opt/${_pkgname}/bin/" | |
cp -r "${srcdir}/${_pkgname}-${pkgver}/bin/lldb" "${pkgdir}/opt/${_pkgname}/bin/lldb" | |
} | |
package_clion() { | |
pkgdesc="C/C++ IDE. Free 30-day trial." | |
optdepends=( | |
'clion-jre' | |
'clion-cmake' | |
'clion-gdb' | |
'clion-lldb' | |
'gdb: native debugger (Set BUNDLED_GDB=0 to remove the bundled one)' | |
'lldb: native debugger (Set BUNDLED_LLDB=0 to remove the bundled one)' | |
'gcc: GNU compiler' | |
'clang: LLVM compiler' | |
'biicode: C/C++ dependency manager' | |
'gtest: C++ testing' | |
'swift: Swift programming language support (Also requires the plugin)' | |
'python: Python programming language support' | |
'python2: Python 2 programming language support' | |
'doxygen: Code documentation generation' | |
) | |
( | |
cat <<EOF | |
[Desktop Entry] | |
Type=Application | |
Version=1.0 | |
Name=CLion | |
GenericName=${_pkgname} | |
Comment=${pkgdesc} | |
Icon=${pkgname} | |
Exec="/usr/bin/${pkgname}" %f | |
Terminal=false | |
Categories=Development;IDE; | |
StartupNotify=true | |
StartupWMClass=jetbrains-${_pkgname} | |
EOF | |
) > ${srcdir}/jetbrains-${pkgname}.desktop | |
mkdir -p "${pkgdir}/opt/" | |
mkdir -p "${pkgdir}/usr/bin/" | |
mkdir -p "${pkgdir}/usr/share/applications/" | |
mkdir -p "${pkgdir}/usr/share/pixmaps/" | |
mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}" | |
cp -r "${srcdir}/${_pkgname}-${pkgver}" "${pkgdir}/opt/${_pkgname}" | |
rm -r "${pkgdir}/opt/${_pkgname}/jre" | |
rm -r "${pkgdir}/opt/${_pkgname}/bin/cmake" | |
rm -r "${pkgdir}/opt/${_pkgname}/bin/gdb" | |
rm -r "${pkgdir}/opt/${_pkgname}/bin/lldb" | |
rm -f "${pkgdir}/opt/${_pkgname}/bin/libyjpagent-linux.so" | |
rm -f "${pkgdir}/opt/${_pkgname}/bin/fsnotifier" | |
install -m 644 "${srcdir}/jetbrains-${pkgname}.desktop" \ | |
"${pkgdir}/usr/share/applications/" | |
ln -s "/opt/${pkgname}/bin/${_pkgname}.svg" \ | |
"${pkgdir}/usr/share/pixmaps/${pkgname}.svg" | |
ln -s "/opt/${pkgname}/license/CLion_Preview_License.txt" \ | |
"${pkgdir}/usr/share/licenses/${pkgname}" | |
ln -s "/opt/${pkgname}/bin/${_pkgname}.sh" \ | |
"${pkgdir}/usr/bin/${pkgname}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment