diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..31a8367 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/sfntly.tar.xz diff --git a/dead.package b/dead.package deleted file mode 100644 index 8ace46a..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -No time to update or make this working/building against current java packaging diff --git a/sfntly-template-pom.xml b/sfntly-template-pom.xml new file mode 100644 index 0000000..8717802 --- /dev/null +++ b/sfntly-template-pom.xml @@ -0,0 +1,34 @@ + + 4.0.0 + com.google.typography.font.sfntly + sfntly + r214 + sfntly java + A Library for Using, Editing, and Creating SFNT-based Fonts + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + com.beust + jcommander + 1.30 + true + + + junit + junit + 4.11 + test + + + com.ibm.icu + icu4j + 50.1 + + + \ No newline at end of file diff --git a/sfntly.spec b/sfntly.spec new file mode 100644 index 0000000..9e1a0fc --- /dev/null +++ b/sfntly.spec @@ -0,0 +1,131 @@ +%global alphatag r214 + +Name: sfntly +Version: 0 +Release: 0.6.%{alphatag}%{?dist} +Summary: A Library for Using, Editing, and Creating SFNT-based Fonts +License: ASL 2.0 +URL: http://code.google.com/p/sfntly/ +# Howto create a tarball archive +# svn checkout -r 214 http://sfntly.googlecode.com/svn/trunk sfntly +# rm -rf sfntly/.svn +# find sfntly -name "*.class" -delete +# find sfntly -name "*.jar" -delete +# rm -rf sfntly/cpp sfntly/data +# tar cJf sfntly.tar.xz sfntly +Source0: %{name}.tar.xz +Source1: %{name}-template-pom.xml +Source2: sfnttool-template-pom.xml + +BuildArch: noarch +BuildRequires: jpackage-utils +BuildRequires: java-devel +BuildRequires: ant +BuildRequires: icu4j, icu4j-charset +BuildRequires: beust-jcommander +BuildRequires: junit +BuildRequires: ant-junit + +Requires: icu4j +Requires: icu4j-charset +Requires: beust-jcommander + +Requires: jpackage-utils +Requires: java + +%description +sfntly is a Java library for using, editing, and creating sfnt +container based fonts (e.g. OpenType, TrueType). This library +was initially created by Google's Font Team. + +The basic features of sfntly are the reading, editing, +and writing of an sfnt container font. + + +%package javadoc +Summary: Javadoc for %{name} + +%description javadoc +This package contains the API documentation for %{name}. + +%prep +%setup -q -n %{name} + +pushd java/src/com/google/typography/font/tools +sed -i '/zipfileset/d' fontinfo/build.xml +sed -i '/zipfileset/d' conversion/build.xml +sed -i '/zipfileset/d' sfnttool/build.xml +popd + +sed -i '/zipfileset/d' java/src/com/google/typography/font/sfntly/sample/build.xml + +sed -i "s|lib/icu4j-charset-4_8_1_1.jar:lib/icu4j-4_8_1_1.jar:lib/jcommander-1.27.jar:lib/junit-4.10.jar|$(build-classpath icu4j-charset):$(build-classpath icu4j):$(build-classpath beust-jcommander):$(build-classpath junit)|" \ + java/javadoc.xml + +%build +pushd java +ant -Dlib.dir=%{_javadir} +popd + +%install +mkdir -p $RPM_BUILD_ROOT%{_javadir}/%{name} +cp -p java/dist/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}.jar +cp -p java/dist/tools/sfnttool/sfnttool.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/sfnttool.jar + +mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir} +install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-%{name}.pom +%add_maven_depmap JPP.%{name}-%{name}.pom %{name}/%{name}.jar +install -pm 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-sfnttool.pom +%add_maven_depmap JPP.%{name}-sfnttool.pom %{name}/sfnttool.jar + +# Samples +cp -p java/dist/sample/sflint/sflint.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/sflint.jar +cp -p java/dist/sample/sfntdump/sfntdump.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/sfntdump.jar + +mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} +cp -rp java/build/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} + +%jpackage_script com.google.typography.font.tools.sfnttool.SfntTool "" "" %{name}/%{name}:%{name}/sfnttool:icu4j-charset:icu4j:beust-jcommander %{name} true + +%check +pushd java +ant -Dlib.dir=%{_javadir} test +popd + +%files +%doc java/COPYING +%{_bindir}/sfntly +%{_javadir}/%{name} +%{_mavenpomdir}/* +%{_mavendepmapfragdir}/* + +%files javadoc +%doc java/COPYING +%{_javadocdir}/%{name} + +%changelog +* Sat Sep 07 2013 Parag Nemade - 0-0.6.r214 +- enable %check and add BR: ant-junit + +* Fri Sep 06 2013 Parag Nemade - 0-0.5.r214 +- Fixed the sfntly binary installation +- added pom file for sfnttool. Thanks to gil again. + +* Thu Sep 05 2013 Parag Nemade - 0-0.4.r214 +- Added pom file + +* Thu Sep 05 2013 Parag Nemade - 0-0.3.r214 +- Removed Requires: jpackage-utils from javadoc sub package +- Add suggestions from gil on #fedora-java channel + +* Mon Aug 26 2013 Parag Nemade - 0-0.2.r214 +- Added COPYING file. + +* Fri Aug 23 2013 Parag Nemade - 0-0.1.r214 +- Update to current svn revision 214 + +* Tue Feb 19 2013 Parag Nemade - 0-0.1.r151 +- Update to current svn revision 151 + +* Tue Feb 12 2013 Parag Nemade - 0-0.1.r125 +- Initial release diff --git a/sfnttool-template-pom.xml b/sfnttool-template-pom.xml new file mode 100644 index 0000000..da8da97 --- /dev/null +++ b/sfnttool-template-pom.xml @@ -0,0 +1,38 @@ + + 4.0.0 + com.google.typography.font.sfntly + sfnttool + r214 + sfnttool java + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + com.google.typography.font.sfntly + sfntly + ${project.version} + + + com.beust + jcommander + 1.30 + true + + + junit + junit + 4.11 + test + + + com.ibm.icu + icu4j + 50.1 + + + \ No newline at end of file diff --git a/sources b/sources new file mode 100644 index 0000000..195d7f1 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +ed33bd57da3d2351d4b2c73825da8265 sfntly.tar.xz