From 5e1fbf1866067c50fa2e8de95a256869b4559a8f Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 28 Aug 2021 23:36:10 +0200 Subject: [PATCH] Add necessary files for CI at OBS --- contrib/baselibs.conf | 1 + contrib/debian.changelog | 23 ++++ contrib/debian.compat | 1 + contrib/debian.control | 34 ++++++ contrib/debian.copyright | 30 +++++ contrib/debian.fluidsynth.install | 2 + contrib/debian.libfluidsynth-dev.install | 3 + contrib/debian.libfluidsynth1.install | 1 + contrib/debian.rules | 98 ++++++++++++++++ contrib/debian.series | 0 contrib/fluidsynth.dsc | 8 ++ contrib/fluidsynth.spec | 142 +++++++++++++++++++++++ 12 files changed, 343 insertions(+) create mode 100644 contrib/baselibs.conf create mode 100644 contrib/debian.changelog create mode 100644 contrib/debian.compat create mode 100644 contrib/debian.control create mode 100644 contrib/debian.copyright create mode 100644 contrib/debian.fluidsynth.install create mode 100644 contrib/debian.libfluidsynth-dev.install create mode 100644 contrib/debian.libfluidsynth1.install create mode 100644 contrib/debian.rules create mode 100644 contrib/debian.series create mode 100644 contrib/fluidsynth.dsc create mode 100644 contrib/fluidsynth.spec diff --git a/contrib/baselibs.conf b/contrib/baselibs.conf new file mode 100644 index 00000000..7fbcb006 --- /dev/null +++ b/contrib/baselibs.conf @@ -0,0 +1 @@ +libfluidsynth2 diff --git a/contrib/debian.changelog b/contrib/debian.changelog new file mode 100644 index 00000000..ce8d3072 --- /dev/null +++ b/contrib/debian.changelog @@ -0,0 +1,23 @@ +fluidsynth (1.1.8-1) unstable; urgency=low + + - Update to version 1.1.8: + * fix build against glib < 2.30 (#202) + * fix dsound audio driver on windows (#215) + * fix a bug around `synth.audio-groups` setting, which caused improper multi-channel rendering (#225) + * cmake 3.0.2 is now required + * compilation with clang is now possible + * build fixes on OS/2 (thanks to @komh) + + -- Tom Moebert Fri, 13 Oct 2017 15:53:00 +0000 + +fluidsynth (1.1.7-1) unstable; urgency=low + + * OBS snapshot. + + -- Rui Nuno Capela Tue, 5 Sep 2017 20:00:00 +0000 + +fluidsynth (1.1.6-1) unstable; urgency=low + + * OBS snapshot. + + -- Rui Nuno Capela Sun, 19 Aug 2012 23:45:01 +0000 diff --git a/contrib/debian.compat b/contrib/debian.compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/contrib/debian.compat @@ -0,0 +1 @@ +9 diff --git a/contrib/debian.control b/contrib/debian.control new file mode 100644 index 00000000..f2b7c878 --- /dev/null +++ b/contrib/debian.control @@ -0,0 +1,34 @@ +Source: fluidsynth +Priority: optional +Section: sound +Maintainer: Rui Nuno Capela +Build-Depends: debhelper (>= 5.0.0), cmake, pkg-config, libdb-dev, libjack-dev, libasound2-dev, + libsndfile-dev, libglib2.0-dev +Standards-Version: 3.7.2 + +Package: libfluidsynth1 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: FluidSynth is a real-time software synthesizer + FluidSynth is a real-time software synthesizer based on + the SoundFont 2 specifications. + +Package: libfluidsynth-dev +Section: libdevel +Architecture: any +Depends: libfluidsynth1 (= ${source:Version}) +Description: FluidSynth is a real-time software synthesizer + FluidSynth is a real-time software synthesizer based on + the SoundFont 2 specifications. + This package contains the header file required for compiling + hosts and plugins. + +Package: fluidsynth +Section: sound +Architecture: any +Depends: libfluidsynth1 (= ${source:Version}) +Description: FluidSynth is a real-time software synthesizer + FluidSynth is a real-time software synthesizer based on + the SoundFont 2 specifications. + This package contains the command-line utilities. diff --git a/contrib/debian.copyright b/contrib/debian.copyright new file mode 100644 index 00000000..0ef4301b --- /dev/null +++ b/contrib/debian.copyright @@ -0,0 +1,30 @@ +This package was debianized by Rui Nuno Capela on +Mon, 25 Jun 2007 10:42:40 +0100. + +It was downloaded from http://www.fluidsynth.org + +Upstream Author: Rui Nuno Capela + +Copyright: + + Copyright (C) 2003-2015, rncbc aka Rui Nuno Capela. All rights reserved. + +License: + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +The Debian packaging is (C) 2007-2013, Rui Nuno Capela and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + diff --git a/contrib/debian.fluidsynth.install b/contrib/debian.fluidsynth.install new file mode 100644 index 00000000..c977166b --- /dev/null +++ b/contrib/debian.fluidsynth.install @@ -0,0 +1,2 @@ +debian/tmp/usr/bin/* +debian/tmp/usr/share/* diff --git a/contrib/debian.libfluidsynth-dev.install b/contrib/debian.libfluidsynth-dev.install new file mode 100644 index 00000000..e2813ffb --- /dev/null +++ b/contrib/debian.libfluidsynth-dev.install @@ -0,0 +1,3 @@ +debian/tmp/usr/include/* +debian/tmp/usr/lib*/*.so +debian/tmp/usr/lib*/pkgconfig/*.pc diff --git a/contrib/debian.libfluidsynth1.install b/contrib/debian.libfluidsynth1.install new file mode 100644 index 00000000..199a0b07 --- /dev/null +++ b/contrib/debian.libfluidsynth1.install @@ -0,0 +1 @@ +debian/tmp/usr/lib*/lib*.so.* diff --git a/contrib/debian.rules b/contrib/debian.rules new file mode 100644 index 00000000..2ab17928 --- /dev/null +++ b/contrib/debian.rules @@ -0,0 +1,98 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +#export DH_COMPAT=7 + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + + +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +config.status: CMakeLists.txt + dh_testdir + + # Add here commands to configure the package. + cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=/usr/lib . + +build: build-stamp +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + # the build should fail if the tests are not successful + #$(MAKE) check + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + #-$(MAKE) distclean + + dh_clean -a + +install: build + dh_testdir + dh_testroot + dh_clean -k -a + dh_installdirs + + # Add here commands to install the package into debian/tmp + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_install -a --list-missing +# dh_installchangelogs -a ChangeLog +# dh_installdocs -a +# dh_installexamples +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo +# dh_installman +# dh_link + dh_strip -a + dh_compress -a + dh_fixperms -a +# dh_perl +# dh_python + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/contrib/debian.series b/contrib/debian.series new file mode 100644 index 00000000..e69de29b diff --git a/contrib/fluidsynth.dsc b/contrib/fluidsynth.dsc new file mode 100644 index 00000000..664e40b7 --- /dev/null +++ b/contrib/fluidsynth.dsc @@ -0,0 +1,8 @@ +Format: 1.0 +Source: fluidsynth +Version: 2.2.0-1 +Binary: fluidsynth, libfluidsynth1, libfluidsynth-dev +Maintainer: Rui Nuno Capela +Architecture: any +Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 5.0.0), cmake, pkg-config, libdb-dev, libjack-dev, libasound2-dev, libsndfile-dev, libglib2.0-dev diff --git a/contrib/fluidsynth.spec b/contrib/fluidsynth.spec new file mode 100644 index 00000000..7401f362 --- /dev/null +++ b/contrib/fluidsynth.spec @@ -0,0 +1,142 @@ +# +# spec file for package fluidsynth +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +# fix build for older distros and architectures where _fillupdir is +# not yet defined by using the old path as recommended by +# https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#.25_fillupdir +%if ! %{defined _fillupdir} + %define _fillupdir /var/adm/fillup-templates +%endif + +Name: fluidsynth +Version: 2.2.2 +Release: 0 +Summary: A Real-Time Software Synthesizer That Uses Soundfont(tm) +License: LGPL-2.1-or-later +Group: Productivity/Multimedia/Sound/Midi +Url: http://www.fluidsynth.org/ +Source: https://github.com/FluidSynth/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source1000: baselibs.conf +BuildRequires: cmake >= 3.1.0 +BuildRequires: gcc-c++ +%if 0%{?is_opensuse} +BuildRequires: ladspa-devel +%endif +BuildRequires: pkgconfig +BuildRequires: readline-devel +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(jack) +BuildRequires: pkgconfig(libinstpatch-1.0) >= 1.1.0 +BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(sndfile) +%if 0%{?suse_version} +%{?systemd_requires} +PreReq: %fillup_prereq +%endif + +%description +FluidSynth (formerly IIWU Synth) is a real-time software synthesizer +based on the SoundFont(tm) 2 specifications. It can read MIDI events +from the MIDI input device and render them to the audio device. It +can also play MIDI files. + +%package devel +Summary: Development package for the fluidsynth library +Group: Development/Libraries/C and C++ +Requires: glibc-devel +Requires: libfluidsynth3 = %{version} +Provides: libfluidsynth-devel = %{version} + +%description devel +This package contains the files needed to compile programs that use the +fluidsynth library. + +%package -n libfluidsynth3 +Summary: Library for Fluidsynth +Group: System/Libraries + +%description -n libfluidsynth3 +This package contains the shared library for Fluidsynth. + +%prep +%setup -q + +%build +%cmake \ + -DFLUID_DAEMON_ENV_FILE=%{_fillupdir}/sysconfig.%{name} \ + -Denable-lash=0 +%cmake_build + +%check +%cmake +%if 0%{?fedora_version} || 0%{?mageia} +%cmake_build --target check +%else +%cmake_build check +%endif + +%install +%cmake_install + +%if 0%{?suse_version} + +# manually install systemd service files +install -Dm 644 build/fluidsynth.conf %{buildroot}%{_fillupdir}/sysconfig.%{name} +install -Dm 644 build/fluidsynth.service %{buildroot}%{_unitdir}/%{name}.service +install -d %{buildroot}%{_sbindir} +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} + +%pre +%service_add_pre %{name}.service + +%post +%fillup_only +%service_add_post %{name}.service + +%preun +%service_del_preun %{name}.service + +%postun +%service_del_postun %{name}.service + +%endif + +%post -n libfluidsynth3 -p /sbin/ldconfig +%postun -n libfluidsynth3 -p /sbin/ldconfig + +%files +%license LICENSE +%doc AUTHORS ChangeLog README.md THANKS TODO +%{_mandir}/man?/* +%{_bindir}/* +%if 0%{?suse_version} +%{_unitdir}/%{name}.service +%{_sbindir}/rc%{name} +%{_fillupdir}/sysconfig.%{name} +%endif + +%files devel +%{_libdir}/lib*.so +%{_includedir}/* +%{_libdir}/pkgconfig/*.pc + +%files -n libfluidsynth3 +%{_libdir}/lib*.so.* + +%changelog