diff options
| author | Andrew <saintruler@gmail.com> | 2020-08-17 19:42:19 -0400 |
|---|---|---|
| committer | Andrew <saintruler@gmail.com> | 2020-08-17 19:42:19 -0400 |
| commit | da5ad1b67290c34b89ce946b01b2cd4972a8b536 (patch) | |
| tree | 9c831344f03aaf1345236b0e29d1adb28764c45c | |
| -rw-r--r-- | .gitignore | 4 | ||||
| -rw-r--r-- | DEBIAN/control | 7 | ||||
| -rwxr-xr-x | DEBIAN/postinst | 4 | ||||
| -rw-r--r-- | Makefile | 37 | ||||
| -rw-r--r-- | clion.desktop | 6 |
5 files changed, 58 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..efa17ea --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.deb +*.tar.gz + +clion-package diff --git a/DEBIAN/control b/DEBIAN/control new file mode 100644 index 0000000..06b4931 --- /dev/null +++ b/DEBIAN/control @@ -0,0 +1,7 @@ +Package: clion +Version: version +Provides: clion +Maintainer: Andrew Guschin <saintruler@gmail.com> +Architecture: all +Section: misc +Description: JetBrains CLion IDE. diff --git a/DEBIAN/postinst b/DEBIAN/postinst new file mode 100755 index 0000000..f48c91e --- /dev/null +++ b/DEBIAN/postinst @@ -0,0 +1,4 @@ +#!/bin/sh + +version="version" +ln -sf "/opt/JetBrains.clion-$version/bin/clion.sh" "/usr/bin/clion" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a1d0cc8 --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +.PHONY: all +.DEFAULT_GOAL: all +all: extract prepare create build + +VERSION=2020.1.3 +PKG_NAME=clion +PKG_FOLDER=${PKG_NAME}-package +PKG_URL=https://download-cf.jetbrains.com/cpp/CLion-${VERSION}.tar.gz +SRC=${PKG_NAME}-src + +${PKG_NAME}-${VERSION}.tar.gz: + wget "${PKG_URL}" -O "${PKG_NAME}-${VERSION}.tar.gz" + +extract: ${PKG_NAME}-${VERSION}.tar.gz + rm -rf "${SRC}" + tar -xf "${PKG_NAME}-${VERSION}.tar.gz" + mv "clion-${VERSION}" "${SRC}" + +prepare: + mkdir -p "${PKG_FOLDER}/opt" + mkdir -p "${PKG_FOLDER}/usr/share/pixmaps" + mkdir -p "${PKG_FOLDER}/usr/share/applications" + cp -r "DEBIAN" "${PKG_FOLDER}" + sed -i "s/Version:.*/Version: ${VERSION}-1/g" "${PKG_FOLDER}/DEBIAN/control" + sed -i "s/version=\".*\"/version=\"${VERSION}\"/g" "${PKG_FOLDER}/DEBIAN/postinst" + +create: ${PKG_FOLDER} + cp "${SRC}/bin/${PKG_NAME}.png" "./${PKG_FOLDER}/usr/share/pixmaps/" + cp "${PKG_NAME}.desktop" "./${PKG_FOLDER}/usr/share/applications/" + mv "${SRC}" "${PKG_FOLDER}/opt/JetBrains.${PKG_NAME}-${VERSION}" + +build: + fakeroot dpkg-deb --build "${PKG_FOLDER}" + +clean: + rm -rf clion-* + diff --git a/clion.desktop b/clion.desktop new file mode 100644 index 0000000..b705bc0 --- /dev/null +++ b/clion.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=JetBrains CLion +Type=Application +Comment=JetBrains CLion C++ IDE +Exec=clion +Icon=clion |