From 785341d888a869989ae5d017b3ddc4fe01b3a43d879dfd878a88cc2b602cf430 Mon Sep 17 00:00:00 2001 From: Dave Plater Date: Thu, 6 Jun 2019 09:19:41 +0000 Subject: [PATCH] Accepting request 708050 from home:plater Added pre_checkin.sh to remove undistributable scansyn files from the source tarball. OBS-URL: https://build.opensuse.org/request/show/708050 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/csound?expand=0&rev=32 --- csound-6.12.2-distibutable.tar.xz | 3 +++ csound-6.12.2.tar.gz | 3 --- csound.changes | 6 +++--- csound.spec | 14 +++++++++----- pre_checkin.sh | 22 ++++++++++++++++++++++ 5 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 csound-6.12.2-distibutable.tar.xz delete mode 100644 csound-6.12.2.tar.gz create mode 100644 pre_checkin.sh diff --git a/csound-6.12.2-distibutable.tar.xz b/csound-6.12.2-distibutable.tar.xz new file mode 100644 index 0000000..a71a480 --- /dev/null +++ b/csound-6.12.2-distibutable.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8ec07b486decbd3edcc442554b73befe7972c81e1723047f5c02a2ff9215d30 +size 20890172 diff --git a/csound-6.12.2.tar.gz b/csound-6.12.2.tar.gz deleted file mode 100644 index 1407081..0000000 --- a/csound-6.12.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39f4872b896eb1cbbf596fcacc0f2122fd3e5ebbb5cec14a81b4207d6b8630ff -size 26297850 diff --git a/csound.changes b/csound.changes index a199684..0a3dc19 100644 --- a/csound.changes +++ b/csound.changes @@ -1,10 +1,10 @@ ------------------------------------------------------------------- Wed Jun 5 13:57:01 UTC 2019 - Dave Plater -- Remove undistributable scansyn files from source. -- Relicenced to GPL-2.0-or-later AND BSD-2-Clause, there is one +- Added pre_checkin.sh to remove undistributable scansyn files from + the source tarball. +- Relicenced to GPL-2.0-or-later AND BSD-3-Clause AND PostgreSQL GPL-2.0 or later source file which relicenses the LGPL sources - and one BSD 2 clause file. - Added COPYING_gpl2+.txt to licenses. ------------------------------------------------------------------- diff --git a/csound.spec b/csound.spec index a6f62cf..69b81ba 100644 --- a/csound.spec +++ b/csound.spec @@ -33,12 +33,16 @@ Name: csound Version: 6.12.2 Release: 0 Summary: Computer Sound Synthesis and Composition Program -License: GPL-2.0-or-later AND BSD-2-Clause +License: GPL-2.0-or-later AND BSD-3-Clause AND PostgreSQL Group: Productivity/Multimedia/Sound/Utilities Url: http://www.csounds.com -Source: https://github.com/%{name}/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +#Source: https://github.com/%%{name}/%%{name}/archive/%%{version}.tar.gz#/%%{name}-%%{version}.tar.gz +Source0: %{name}-%{version}-distibutable.tar.xz Source1: README.SUSE Source2: COPYING_gpl2+.txt +#Update and remove undistributable files from the sources and repack with this script +#Usage = ./pre_checkin.sh +Source3: pre_checkin.sh # Default to using pulseaudio instead of portaudio Patch2: csound-6.08-default-pulse.patch # Use xdg-open to open a browser to view the manual @@ -80,7 +84,6 @@ Recommends: %{name}-lang BuildRoot: %{_tmppath}/%{name}-%{version}-build %global luaver %(lua -v | sed -r 's/Lua ([[:digit:]]+\\.[[:digit:]]+).*/\\1/') - %description Csound is a software synthesis program. It is fully modular and supports an unlimited amount of oscillators and filters. @@ -138,7 +141,8 @@ sed -i 's:__DATE__:"":' Engine/musmon.c include/version.h Top/main.c # copy readme cp %{SOURCE1} %{SOURCE2} . #These source files are undistributable -rm -f Opcodes/scansyn* +#rm -f Opcodes/scansyn* +head -n 28 util/SDIF/sdif.c > COPYING.PostgreSQL %build # Needed to link libbuchla.so @@ -182,7 +186,7 @@ rm -rf %{buildroot}root %files %doc AUTHORS README.md README.SUSE Release_Notes -%license COPYING OOps/LICENCE.random COPYING_gpl2+.txt +%license COPYING OOps/LICENCE.random COPYING_gpl2+.txt COPYING.PostgreSQL %{_bindir}/* %files -n libcsnd6-%{maj}_%{min} diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..f59d4d0 --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,22 @@ +#! /bin/bash + +vers=$(cat csound.spec|grep "Version: "|cut -b 17-23) +rm -f *.tar.* +wget https://github.com/csound/csound/archive/${vers}.tar.gz || exit 1 +echo "\n\nUnpacking tarball\n" +tar -xf ${vers}.tar.gz +echo "Removing undistibutable files\n" +rm -f csound-${vers}/Opcodes/scansyn* +echo "Creating distributable tarball\n" +tar -acf csound-${vers}-distibutable.tar.xz csound-${vers} +echo "Cleaning up\n" +rm -rf csound-${vers} ${vers}.tar.gz +if ! test -e ${vers}.tar.gz; +then +echo "success" +osc ar +exit 0 +else +echo "error" +exit 1 +fi