Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] make sublime-text3 restricted
@ 2022-02-28 23:56 classabbyamp
  2022-02-28 23:57 ` [PR REVIEW] " classabbyamp
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: classabbyamp @ 2022-02-28 23:56 UTC (permalink / raw)
  To: ml

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

There is a new 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 15c13670adfc0e38a9f7dbfc4fa17357b5ada068 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@kb6.ee>
Date: Mon, 28 Feb 2022 18:48:24 -0500
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 b547aab3c42a7177682c507f2318f86da386634d Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@kb6.ee>
Date: Mon, 28 Feb 2022 18:49:55 -0500
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..0af32c71d127
--- /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-merge>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
+}

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-03-15 20:31 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 23:56 [PR PATCH] make sublime-text3 restricted 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 ` [PR PATCH] [Updated] " classabbyamp
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

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).