SPECS: tuxguitar.spec - build section based on Fedora spec - BuildRequires:...
cactus
cactus at pld-linux.org
Sat Oct 18 00:17:48 CEST 2008
Author: cactus Date: Fri Oct 17 22:17:48 2008 GMT
Module: SPECS Tag: HEAD
---- Log message:
- build section based on Fedora spec
- BuildRequires: fluidsynth-devel
- because of so-libs this in not noarch
- now use make to build all needed parts
- updated TODO
- rel 0.7 - please test this release
---- Files affected:
SPECS:
tuxguitar.spec (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SPECS/tuxguitar.spec
diff -u SPECS/tuxguitar.spec:1.1 SPECS/tuxguitar.spec:1.2
--- SPECS/tuxguitar.spec:1.1 Fri Oct 17 00:53:36 2008
+++ SPECS/tuxguitar.spec Sat Oct 18 00:17:42 2008
@@ -1,13 +1,12 @@
# $Revision$, $Date$
# TODO:
-# prepare working sh file :
-# java -Djava.library.path=/usr/lib/swt -Dtuxguitar.share.path=/usr/share/tuxguitar \
-# -cp /usr/share/java/swt.jar:.:/usr/share/tuxguitar/tuxguitar.jar: org.herac.tuxguitar.gui.TGMain
+# - prepare nice patch or sf
+# - fill summary and desc
Summary: tuxguitar
#Summary(pl.UTF-8):
Name: tuxguitar
Version: 1.0
-Release: 0.2
+Release: 0.7
License: LGPL v2.1+
Group: X11/Applications/Sound
Source0: http://dl.sourceforge.net/tuxguitar/%{name}-src-%{version}.tar.gz
@@ -16,11 +15,11 @@
BuildRequires: ant
# need eclipse-swt with cairo
BuildRequires: eclipse-swt
+BuildRequires: fluidsynth-devel
BuildRequires: jdk
BuildRequires: jpackage-utils
BuildRequires: rpmbuild(macros) >= 1.300
Requires: jpackage-utils
-BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -31,42 +30,45 @@
%prep
%setup -q -n %{name}-src-%{version}
+#based on Fedora spec
+#Prevent static library paths to be built in TuxGuitar.jar (META-INF/MANIFEST.MF)
+sed -i 's/<attribute name="Class-Path" value="${lib.swt.jar} ${dist.share.path}"\/>//' TuxGuitar/build.xml
+# Declare the library path and classpath during runtime instead
+sed -i 's|env_$|env_\nexport CLASSPATH=%{_javadir}/swt.jar\n|' misc/tuxguitar.sh
+sed -i 's|PACKAGE_LIB:=%{_libdir}/jni|PACKAGE_LIB:=%{_libdir}/%{name}|' misc/tuxguitar.sh
+sed -i 's|-Djava.library.path=${PACKAGE_LIB}|-Djava.library.path=${PACKAGE_LIB}:%{_libdir}/swt|' misc/tuxguitar.sh
+# Add exec to replace the called shell
+sed -i 's|${JAVA} ${JAVA_FLAGS}|exec ${JAVA} ${JAVA_FLAGS}|' misc/tuxguitar.sh
+
+# Disable the pdf plugin that depends on "iText" which is currently not available on Fedora
+sed -i 's/TuxGuitar-pdf \\/\\/g' Makefile
+sed -i 's/.\/TuxGuitar-pdf\/tuxguitar-pdf.jar \\/\\/g' Makefile
+# Change /lib to %%{_lib}, just in case
+sed -i 's/\/lib\//\/%{_lib}\//g' Makefile
+sed -i 's/\/lib\//\/%{_lib}\//g' misc/tuxguitar.sh
+sed -i 's/\/lib\//\/%{_lib}\//g' TuxGuitar/xml/build-linux.xml
+# Don't strip the binaries during %%install
+sed -i 's/install -s/install -m 755/g' Makefile
+# Remove pre-shipped binaries
+find -name .DS_Store -exec rm {} \;
+
%build
export JAVA_HOME=%{java_home}
export CLASSPATH=$(build-classpath swt)
-%ant -f TuxGuitar/build.xml build
-#%ant -f TuxGuitar-CoreAudio/build.xml build
-%ant -f TuxGuitar-alsa/build.xml build
-%ant -f TuxGuitar-ascii/build.xml build
-%ant -f TuxGuitar-browser-ftp/build.xml build
-%ant -f TuxGuitar-compat/build.xml build
-%ant -f TuxGuitar-converter/build.xml build
-%ant -f TuxGuitar-fluidsynth/build.xml build
-%ant -f TuxGuitar-gtp/build.xml build
-%ant -f TuxGuitar-jsa/build.xml build
-%ant -f TuxGuitar-lilypond/build.xml build
-%ant -f TuxGuitar-midi/build.xml build
-%ant -f TuxGuitar-musicxml/build.xml build
-%ant -f TuxGuitar-oss/build.xml build
-#%ant -f TuxGuitar-pdf/build.xml build
-%ant -f TuxGuitar-ptb/build.xml build
-%ant -f TuxGuitar-tef/build.xml build
-%ant -f TuxGuitar-tray/build.xml build
-%ant -f TuxGuitar-winmm/build.xml build
-
-cp -f TuxGuitar-*/*.jar TuxGuitar/share/plugins/
-
-%ant -f TuxGuitar/build.xml package
+%{__make} SWT_JAR=$(build-classpath swt) CFLAGS="${RPM_OPT_FLAGS} -I%{JAVA_HOME}/include -I%{JAVA_HOME}/include/linux -fPIC"
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_javadir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
+%{__make} DESTDIR=$RPM_BUILD_ROOT INSTALL_LIB_DIR=$RPM_BUILD_ROOT/%{_libdir}/%{name} install
+%{__make} DESTDIR=$RPM_BUILD_ROOT INSTALL_LIB_DIR=$RPM_BUILD_ROOT/%{_libdir}/%{name} install-linux
+
+cp -f TuxGuitar-*/*.jar TuxGuitar/share/plugins/
%{__make} -C TuxGuitar install DESTDIR=$RPM_BUILD_ROOT
install TuxGuitar/%{name}.jar $RPM_BUILD_ROOT%{_datadir}/%{name}
-install TuxGuitar/%{name} $RPM_BUILD_ROOT%{_bindir}
install misc/%{name}.tg $RPM_BUILD_ROOT%{_datadir}/%{name}
install misc/%{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1
@@ -79,7 +81,8 @@
%files
%defattr(644,root,root,755)
%doc AUTHORS README ChangeLog
-%{_javadir}/%{name}.jar
+%dir %{_libdir}/%{name}
+%attr(755,root,root) %{_libdir}/%{name}/libtuxguitar-*.so
%{_datadir}/%{name}
%attr(755,root,root) %{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
@@ -92,6 +95,14 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.2 2008/10/17 22:17:42 cactus
+- build section based on Fedora spec
+- BuildRequires: fluidsynth-devel
+- because of so-libs this in not noarch
+- now use make to build all needed parts
+- updated TODO
+- rel 0.7 - please test this release
+
Revision 1.1 2008/10/16 22:53:36 cactus
- initial
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/tuxguitar.spec?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list