Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] make sublime-text3 restricted
Date: Mon, 14 Mar 2022 20:11:28 +0100	[thread overview]
Message-ID: <20220314191128.6W-SSsFruUSKVCUPc9NJZOl8ORO6Nc0w0zdD2rglJm4@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-35896@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1548 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages sublime-text3-restricted
https://github.com/void-linux/void-packages/pull/35896

make sublime-text3 restricted
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

from the [EULA](https://www.sublimehq.com/eula) 2b (emphasis mine):
> **You may not distribute** or sell license keys or **the SOFTWARE PRODUCT to third parties**. Licenses will be revoked if distributed or sold to third parties.

I followed the example of sublime-merge -> sublime-merge-bin

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/35896.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sublime-text3-restricted-35896.patch --]
[-- Type: text/x-diff, Size: 5146 bytes --]

From 432317466c0aff7bc798d72acfd99d3a80f7133b Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@kb6.ee>
Date: Mon, 14 Mar 2022 15:10:03 -0400
Subject: [PATCH 1/2] sublime-text3: replace with empty meta package

---
 srcpkgs/sublime-text3/INSTALL.msg |  4 ++++
 srcpkgs/sublime-text3/template    | 33 +++++--------------------------
 2 files changed, 9 insertions(+), 28 deletions(-)
 create mode 100644 srcpkgs/sublime-text3/INSTALL.msg

diff --git a/srcpkgs/sublime-text3/INSTALL.msg b/srcpkgs/sublime-text3/INSTALL.msg
new file mode 100644
index 000000000000..cf4c4e70a7a9
--- /dev/null
+++ b/srcpkgs/sublime-text3/INSTALL.msg
@@ -0,0 +1,4 @@
+sublime-text3 is replaced with the restricted sublime-text3-bin
+package, due to its license that restricts redistribution.
+In order to install it you have to build it with xbps-src, please see:
+https://docs.voidlinux.org/xbps/repositories/restricted.html
diff --git a/srcpkgs/sublime-text3/template b/srcpkgs/sublime-text3/template
index c693768e6e4e..345a5ecd8461 100644
--- a/srcpkgs/sublime-text3/template
+++ b/srcpkgs/sublime-text3/template
@@ -1,36 +1,13 @@
 # Template file for 'sublime-text3'
 pkgname=sublime-text3
 version=3211
-revision=2
-depends="libpng gtk+ hicolor-icon-theme desktop-file-utils"
-short_desc="Sophisticated text editor for code, markup and prose"
+revision=3
+build_style=meta
+short_desc="Empty meta-package for sublime-text3"
 maintainer="Andrea Brancaleoni <miwaxe@pompel.me>"
-license="custom:Proprietary"
+license="custom:EULA" #no vlicense check
 homepage="http://www.sublimetext.com/3dev"
 
-if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
-	distfiles="https://download.sublimetext.com/sublime_text_3_build_${version}_x64.tar.bz2"
-	checksum=0b3c8ca5e6df376c3c24a4b9ac2e3b391333f73b229bc6e87d0b4a5f636d74ee
-else
-	distfiles="https://download.sublimetext.com/sublime_text_3_build_${version}_x32.tar.bz2"
-	checksum=480609962bbbd12128b5332c7831372b8851c13e160512730d1b0a6a835a3071
-fi
-
-repository="nonfree"
-archs="i686 x86_64"
-wrksrc="sublime_text_3"
-nopie=yes
-
 do_install() {
-	vmkdir "usr/bin"
-	vmkdir "usr/lib/sublime_text"
-	cp --preserve=mode -r ./* "${DESTDIR}/usr/lib/sublime_text"
-	vinstall "sublime_text.desktop" 644 "usr/share/applications/"
-	for size in 128 16 256 32 48; do
-		vinstall "Icon/${size}x${size}/sublime-text.png" 644 \
-		 "usr/share/icons/hicolor/${size}x${size}/apps/"
-	done
-	ln -s /usr/lib/sublime_text/sublime_text ${DESTDIR}/usr/bin/subl3
-	vsed -e 's:Exec=/opt/sublime_text/:Exec=/usr/lib/sublime_text/:' \
-	 -i ${DESTDIR}/usr/share/applications/sublime_text.desktop
+	vdoc "${XBPS_SRCPKGDIR}/${pkgname}/INSTALL.msg"  README.voidlinux
 }

From 2a743c8cdfe6b1f737e24b38189bb2dfbc8af94d Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@kb6.ee>
Date: Mon, 14 Mar 2022 15:11:07 -0400
Subject: [PATCH 2/2] New package: sublime-text3-bin-3211

replaces sublime-text3
---
 srcpkgs/sublime-text3-bin/template | 55 ++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 srcpkgs/sublime-text3-bin/template

diff --git a/srcpkgs/sublime-text3-bin/template b/srcpkgs/sublime-text3-bin/template
new file mode 100644
index 000000000000..73d67ea9c631
--- /dev/null
+++ b/srcpkgs/sublime-text3-bin/template
@@ -0,0 +1,55 @@
+# Template file for 'sublime-text3-bin'
+pkgname=sublime-text3-bin
+version=3211
+revision=1
+archs="i686 x86_64"
+wrksrc="sublime_text_3"
+hostmakedepends="w3m"
+depends="libpng gtk+ hicolor-icon-theme desktop-file-utils"
+short_desc="Sophisticated text editor for code, markup and prose"
+maintainer="Andrea Brancaleoni <miwaxe@pompel.me>"
+license="custom:EULA"
+homepage="http://www.sublimetext.com/3dev"
+_license_checksum=33929b71625d13dacf2a0a5853171b9c04058f71e2955ee660b8d0f8dda45ed1
+repository="nonfree"
+restricted=yes
+nopie=yes
+replaces="sublime-text3>0"
+
+if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+	distfiles="https://download.sublimetext.com/sublime_text_3_build_${version}_x64.tar.bz2"
+	checksum=0b3c8ca5e6df376c3c24a4b9ac2e3b391333f73b229bc6e87d0b4a5f636d74ee
+else
+	distfiles="https://download.sublimetext.com/sublime_text_3_build_${version}_x32.tar.bz2"
+	checksum=480609962bbbd12128b5332c7831372b8851c13e160512730d1b0a6a835a3071
+fi
+
+post_extract() {
+	$XBPS_FETCH_CMD https://www.sublimehq.com/eula
+	sed -n '
+		/is licensed.*not sold/p
+		/<ol>/,${ /<\/ol>/{x;p;d}; H }
+		$a </ol>
+	' <eula | w3m -dump -I utf-8 -T text/html >EULA
+
+	filesum="$(xbps-digest EULA)"
+	if [ "$filesum" != "$_license_checksum" ]; then
+		msg_error "SHA256 mismatch for EULA:\n$filesum\n"
+	fi
+}
+
+
+do_install() {
+	vmkdir "usr/bin"
+	vmkdir "usr/lib/sublime_text"
+	cp --preserve=mode -r ./* "${DESTDIR}/usr/lib/sublime_text"
+	vinstall "sublime_text.desktop" 644 "usr/share/applications/"
+	for size in 128 16 256 32 48; do
+		vinstall "Icon/${size}x${size}/sublime-text.png" 644 \
+		 "usr/share/icons/hicolor/${size}x${size}/apps/"
+	done
+	ln -s /usr/lib/sublime_text/sublime_text ${DESTDIR}/usr/bin/subl3
+	vsed -e 's:Exec=/opt/sublime_text/:Exec=/usr/lib/sublime_text/:' \
+	 -i ${DESTDIR}/usr/share/applications/sublime_text.desktop
+	vlicense EULA
+}

  parent reply	other threads:[~2022-03-14 19:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 23:56 [PR PATCH] " classabbyamp
2022-02-28 23:57 ` [PR REVIEW] " classabbyamp
2022-03-01  0:00 ` classabbyamp
2022-03-05 23:03 ` [PR PATCH] [Updated] " classabbyamp
2022-03-06  3:13 ` classabbyamp
2022-03-06 13:31 ` paper42
2022-03-06 15:17 ` [PR PATCH] [Updated] " classabbyamp
2022-03-06 15:17 ` classabbyamp
2022-03-06 15:22 ` classabbyamp
2022-03-06 15:22 ` classabbyamp
2022-03-06 16:31 ` paper42
2022-03-06 16:32 ` [PR REVIEW] " paper42
2022-03-06 16:46 ` classabbyamp
2022-03-06 16:47 ` classabbyamp
2022-03-06 16:49 ` [PR PATCH] [Updated] " classabbyamp
2022-03-08 19:35 ` [PR REVIEW] " Chocimier
2022-03-08 19:37 ` classabbyamp
2022-03-08 19:39 ` Chocimier
2022-03-14 19:11 ` classabbyamp [this message]
2022-03-14 19:21 ` Chocimier
2022-03-14 19:25 ` [PR PATCH] [Updated] " classabbyamp
2022-03-14 19:27 ` classabbyamp
2022-03-15 20:31 ` [PR PATCH] [Merged]: " Chocimier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220314191128.6W-SSsFruUSKVCUPc9NJZOl8ORO6Nc0w0zdD2rglJm4@z \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).