From 0ef1e2f7d43e104c9a43da53b2ce5b63851bc847 Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Thu, 13 Sep 2012 13:57:07 +0200 Subject: [PATCH 1/4] initial srpm import for f18 --- .gitignore | 1 + sources | 1 + wt-3.2.2-PACKAGE-LICENSING | 13 ++ wt-generate-tarball.sh | 16 +++ wt.spec | 263 +++++++++++++++++++++++++++++++++++++ 5 files changed, 294 insertions(+) create mode 100644 wt-3.2.2-PACKAGE-LICENSING create mode 100644 wt-generate-tarball.sh create mode 100644 wt.spec diff --git a/.gitignore b/.gitignore index e69de29..e4213a0 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/wt-3.2.2-p1-free.tar.gz diff --git a/sources b/sources index e69de29..eed2a13 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +dbf753792c27247ca3a52e3198b178f4 wt-3.2.2-p1-free.tar.gz diff --git a/wt-3.2.2-PACKAGE-LICENSING b/wt-3.2.2-PACKAGE-LICENSING new file mode 100644 index 0000000..ca03558 --- /dev/null +++ b/wt-3.2.2-PACKAGE-LICENSING @@ -0,0 +1,13 @@ +The entire source code is GPLv2 except for these files: + * Boost Software License (BSL v1.0) + * src/http/* + * src/web/random_device.cpp + * src/rapidxml/* (dual licensed with MIT/X11 (BSD like)) + * MIT/X11 (BSD like) + * examples/wtwithqt/* + * BSD + * src/Wt/Auth/passwdqc.h + * src/Wt/Auth/passwdqc_check.h + * zlib/libpng + * src/web/md5.[ch] + * src/web/base64.h diff --git a/wt-generate-tarball.sh b/wt-generate-tarball.sh new file mode 100644 index 0000000..4605c69 --- /dev/null +++ b/wt-generate-tarball.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +NAME="wt" +VERSION=$1 + +tmp=`mktemp -d` +tar -xzvf $NAME-$VERSION.tar.gz -C $tmp +pushd $tmp +pushd $NAME-$VERSION/src/Wt/Dbo/backend +rm -r ibpp +popd # backend +tar -czvf $NAME-$VERSION-free.tar.gz $NAME-$VERSION +popd # tmp +mv $tmp/$NAME-$VERSION-free.tar.gz . +rm -r $tmp + diff --git a/wt.spec b/wt.spec new file mode 100644 index 0000000..697c3c8 --- /dev/null +++ b/wt.spec @@ -0,0 +1,263 @@ +%global WTSRVDIR /var/spool/wt +%global WTRUNDIR %{WTSRVDIR}/run + +%global WTRUNUSER apache +%global WTRUNGROUP apache + +%global _version 3.2.2 +%global patchlevel 1 +%global posttag p%{patchlevel} +%global upstreamver %{_version}-%{posttag} + +Name: wt +Version: %{_version} +Release: 5.%{posttag}%{?dist} +Summary: C++ library for developing web applications + +Group: Development/Libraries +# For a breakdown of the licensing, see PACKAGE-LICENSING +License: GPLv2 and Boost and MIT and (Boost or MIT) and BSD and zlib +URL: http://www.webtoolkit.eu/wt +# Following archive was made from upstream tarball downloaded from +# http://citylan.dl.sourceforge.net/project/witty/wt/3.2.2/wt-3.2.2-p1.tar.gz +# by running generate-tarball.sh 3.2.2-p1 from tarball's directory +Source0: %{name}-%{upstreamver}-free.tar.gz +Source1: %{name}-%{_version}-PACKAGE-LICENSING +# wt toolkit contains bundled non-free library (IBPP) that we cannot ship. +# Therefore we use this script to remove its code before shipping it. +# Download the upstream tarball and invoke this script while in the +# tarball's directory: +# sh wt-generate-tarball.sh UPSTREAM_VERSION +Source2: wt-generate-tarball.sh + +BuildRequires: cmake boost-devel%{_isa} >= 1.41 openssl-devel libharu-devel +BuildRequires: GraphicsMagick-devel pango-devel sqlite-devel postgresql-devel +BuildRequires: fcgi-devel zlib-devel qt-devel + +%description +Web C++ library with widget oriented API that uses well-tested patterns of +desktop GUI development tailored to the web. To the developer, it offers +abstraction of web-specific implementation details, including client-server +protocols, event handling, graphics support, graceful degradation (or +progressive enhancement), and URL handling. + +%package dbo +Summary: Wt::Dbo ORM library and Sqlite3 back-end +Group: Development/Libraries + +%description dbo +This package contains the Wt::Dbo Object-Relational Mapping library +and Sqlite3 back-end of it. + +%package dbo-postgres +Summary: PostgreSQL back-end for the Wt::Dbo ORM library +Group: Development/Libraries +Requires: %{name}-dbo%{?_isa} = %{version}-%{release} + +%description dbo-postgres +This package contains the PostgresSQL back-end for the Wt::Dbo ORM library. + +%package devel +Summary: Libraries and header files for witty web development +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-dbo%{?_isa} = %{version}-%{release} +Requires: %{name}-dbo-postgres%{?_isa} = %{version}-%{release} +Requires: cmake + +%description devel +This package contains the files necessary to develop +applications using the Wt toolkit and the Wt::Dbo ORM library. + +%package examples +Summary: Examples for Wt +Group: Development/Libraries +License: GPLv2 and MIT +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-dbo%{?_isa} = %{version}-%{release} + +%description examples +This package contains programming examples distributed with official Wt +release. + +%package doc +Summary: Documents for the Wt toolkit +Group: Documentation +BuildArch: noarch + +%description doc +This package contains the documents for Wt API and examples. + +%prep +%setup -q -n %{name}-%{upstreamver} +for d in src resources examples; do + find $d -type f \( -iregex '.*\.\([hc]\|js\|css\)' -o -executable \) | \ + xargs -r chmod -v 0644 +done +find examples -type f -name .htaccess | while read f; do + mv -v $f `dirname $f`/htaccess +done +# conversion to UTF-8 +convdir=`mktemp -d` +for f in examples/style/CornerImage.h; do + tmpf=${convdir}/`basename $f` + iconv -f iso-8859-2 -t UTF-8 $f >$tmpf + mv $tmpf $f +done +rmdir $convdir + +%build +mkdir wt-build +cd wt-build +## wtdbofirebird library bundles IBPP c++ client library for firebird +## that is licensed under IBPP License, which is marked as Non-Free +## by Red Hat Legal +## let's not package it, until licensing issues are solved +%cmake .. \ + -DCONNECTOR_HTTP=ON \ + -DCONNECTOR_FCGI=ON \ + -DUSE_SYSTEM_SQLITE3=ON \ + -DWEBUSER="%{WTRUNUSER}" \ + -DWEBGROUP="%{WTRUNGROUP}" \ + -DRUNDIR="%{WTRUNDIR}" \ + -DINSTALL_EXAMPLES=ON \ + -DENABLE_FIREBIRD=OFF \ + -DEXAMPLES_DESTINATION=%{_lib}/Wt/examples +make %{?_smp_mflags} + +%install +pushd wt-build +make install DESTDIR=$RPM_BUILD_ROOT +install -v -m 0755 -d ${RPM_BUILD_ROOT}/%{_sysconfdir}/%{name} +cp -v wt_config.xml ${RPM_BUILD_ROOT}/%{_sysconfdir}/%{name} + +# makes an absolute symlink to resources directory +make_rsc_link() { + ln -vs "%{_datadir}/Wt/resources" \ + "${RPM_BUILD_ROOT}%{_libdir}/Wt/examples/$1" +} + +# installation of examples +pushd examples +for d in `find . -maxdepth 1 -mindepth 1 -type d | \ + grep -v '^\(CMakeFiles\|feature\)$'`; do + # create a symlink for each example pointing on resources dir + make_rsc_link $d +done +for d in `find feature -maxdepth 1 -mindepth 1 -type d | grep -v 'CMakeFiles'`; +do # create a symlink for each feature example pointing on resources dir + make_rsc_link $d +done +popd # examples +popd # wt-build + +# installation of documentation +for d in %{name} %{name}-dbo %{name}-doc; do + install -v -m 0755 -d ${RPM_BUILD_ROOT}%{_defaultdocdir}/$d-%{version}/ + cp -v LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/$d-%{version}/ + install -vm 644 %{SOURCE1} \ + ${RPM_BUILD_ROOT}%{_defaultdocdir}/$d-%{version}/PACKAGE-LICENSING +done +cp -vr README.md ReleaseNotes.html Changelog \ + ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-%{version}/ +cp -vr INSTALL*.html doc/* ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-doc-%{version}/ + +pushd ${RPM_BUILD_ROOT} +mkdir -vp .%{WTSRVDIR} +mkdir -vp .%{WTRUNDIR} +install -v -m 0755 -d .%{_datadir}/cmake/Modules +mv -v .%{_prefix}/cmake/*.cmake .%{_datadir}/cmake/Modules + +# cleanup +rm -rfv ${_prefix}/cmake +for d in examples reference; do + rm -v .%{_defaultdocdir}/%{name}-doc-%{version}/$d/html/installdox +done +rm -v .%{_defaultdocdir}/%{name}-doc-%{version}/main +find .%{_libdir}/Wt/examples -regex '.*/\(CMakeFiles\|.*\.cmake\|Doxygen\)' | \ + xargs rm -rfv +# these scripts were used to generate pictures +find .%{_datadir}/Wt/resources -name 'generate.sh' | xargs rm -v +popd + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig +%post dbo -p /sbin/ldconfig +%postun dbo -p /sbin/ldconfig +%post dbo-postgres -p /sbin/ldconfig +%postun dbo-postgres -p /sbin/ldconfig + +%files +%config(noreplace) %{_sysconfdir}/%{name}/wt_config.xml +%{_libdir}/libwt.so.* +%{_libdir}/libwtext.so.* +%{_libdir}/libwtfcgi.so.* +%{_libdir}/libwthttp.so.* +%{_libdir}/libwttest.so.* +%dir %{_defaultdocdir}/%{name}-%{version} +%doc %{_defaultdocdir}/%{name}-%{version}/README.md +%doc %{_defaultdocdir}/%{name}-%{version}/LICENSE +%doc %{_defaultdocdir}/%{name}-%{version}/ReleaseNotes.html +%doc %{_defaultdocdir}/%{name}-%{version}/Changelog +%doc %{_defaultdocdir}/%{name}-%{version}/PACKAGE-LICENSING +%dir %{_datadir}/Wt +%dir %{_datadir}/Wt/resources +%{_datadir}/Wt/resources/* +%dir %{WTSRVDIR} +%dir %{WTRUNDIR} + +%files dbo +%dir %{_defaultdocdir}/%{name}-dbo-%{version} +%doc %{_defaultdocdir}/%{name}-dbo-%{version}/LICENSE +%doc %{_defaultdocdir}/%{name}-dbo-%{version}/PACKAGE-LICENSING +%{_libdir}/libwtdbo.so.* +%{_libdir}/libwtdbosqlite3.so.* + +%files dbo-postgres +%{_libdir}/libwtdbopostgres.so.* + +%files devel +# header files +%dir %{_includedir}/Wt +%{_includedir}/Wt/* +%{_libdir}/*.so +%{_datadir}/cmake/Modules/*.cmake + +%files examples +%dir %{_libdir}/Wt +%dir %{_libdir}/Wt/examples +%{_libdir}/Wt/examples/* + +%files doc +%dir %{_defaultdocdir}/%{name}-doc-%{version} +%doc %{_defaultdocdir}/%{name}-doc-%{version}/LICENSE +%doc %{_defaultdocdir}/%{name}-doc-%{version}/PACKAGE-LICENSING +%{_defaultdocdir}/%{name}-doc-%{version}/*.html +%dir %{_defaultdocdir}/%{name}-doc-%{version}/images +%dir %{_defaultdocdir}/%{name}-doc-%{version}/reference +%dir %{_defaultdocdir}/%{name}-doc-%{version}/tutorial +%dir %{_defaultdocdir}/%{name}-doc-%{version}/examples +%{_defaultdocdir}/%{name}-doc-%{version}/images/* +%{_defaultdocdir}/%{name}-doc-%{version}/reference/* +%{_defaultdocdir}/%{name}-doc-%{version}/tutorial/* +%{_defaultdocdir}/%{name}-doc-%{version}/examples/* + +%changelog +* Wed Sep 12 2012 Michal Minář - 3.2.2-5.p1 +- Added wt-generate-tarball.sh script for source tarball generation + from upstream tarball, in order to remove the IBPP non-free library + from source. + +* Mon Sep 03 2012 Michal Minar - 3.2.2-4.p1 +- separated doc dirs for independent subpackages -dbo and -doc + +* Fri Aug 24 2012 Michal Minar - 3.2.2-3.p1 +- Own examples directory. +- Include a copy of license in wt-doc. +- Added License tag for wt-examples. + +* Fri Aug 24 2012 Michal Minar - 3.2.2-2.p1 +- Not packaging back-end due to licensing issues. + +* Tue Aug 21 2012 Michal Minar - 3.2.2-1.p1 +- Initial Package for FE. From 79ba4c7f0716b2ba6630af75a74ca0cd784e8521 Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Thu, 13 Sep 2012 14:49:03 +0200 Subject: [PATCH 2/4] fixed changelog line removed diacritic and added missing email --- wt.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wt.spec b/wt.spec index 697c3c8..c12e9cf 100644 --- a/wt.spec +++ b/wt.spec @@ -11,7 +11,7 @@ Name: wt Version: %{_version} -Release: 5.%{posttag}%{?dist} +Release: 6.%{posttag}%{?dist} Summary: C++ library for developing web applications Group: Development/Libraries @@ -243,7 +243,10 @@ popd %{_defaultdocdir}/%{name}-doc-%{version}/examples/* %changelog -* Wed Sep 12 2012 Michal Minář - 3.2.2-5.p1 +* Thu Sep 13 2012 Michal Minar - 3.2.2-6.p1 +- fixed changelog line + +* Wed Sep 12 2012 Michal Minar - 3.2.2-5.p1 - Added wt-generate-tarball.sh script for source tarball generation from upstream tarball, in order to remove the IBPP non-free library from source. From 5987bddec4fcbddacc9725afda69a35b772ed043 Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Wed, 26 Dec 2012 12:45:51 +0100 Subject: [PATCH 3/4] removed redundant file --- wt-3.2.2-PACKAGE-LICENSING | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 wt-3.2.2-PACKAGE-LICENSING diff --git a/wt-3.2.2-PACKAGE-LICENSING b/wt-3.2.2-PACKAGE-LICENSING deleted file mode 100644 index ca03558..0000000 --- a/wt-3.2.2-PACKAGE-LICENSING +++ /dev/null @@ -1,13 +0,0 @@ -The entire source code is GPLv2 except for these files: - * Boost Software License (BSL v1.0) - * src/http/* - * src/web/random_device.cpp - * src/rapidxml/* (dual licensed with MIT/X11 (BSD like)) - * MIT/X11 (BSD like) - * examples/wtwithqt/* - * BSD - * src/Wt/Auth/passwdqc.h - * src/Wt/Auth/passwdqc_check.h - * zlib/libpng - * src/web/md5.[ch] - * src/web/base64.h From 712c99c8c2b0d39ee987cb3063899252e7da21ad Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Thu, 20 Jun 2013 15:32:31 +0200 Subject: [PATCH 4/4] update to 3.3.0 removed deprecated libwtext lib --- .gitignore | 1 + sources | 2 +- ...2.3-PACKAGE-LICENSING => wt-3.3.0-PACKAGE-LICENSING | 0 wt-generate-tarball.sh | 0 wt.spec | 10 ++++++---- 5 files changed, 8 insertions(+), 5 deletions(-) rename wt-3.2.3-PACKAGE-LICENSING => wt-3.3.0-PACKAGE-LICENSING (100%) mode change 100644 => 100755 wt-generate-tarball.sh diff --git a/.gitignore b/.gitignore index 5037c86..aaf9455 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /wt-3.2.2-p1-free.tar.gz /wt-3.2.3-free.tar.gz +/wt-3.3.0-free.tar.gz diff --git a/sources b/sources index ed222f5..3e60ef2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -dbf753792c27247ca3a52e3198b178f4 wt-3.2.2-p1-free.tar.gz 234e3d21d7fa7407d3784bb757d8e3cd wt-3.2.3-free.tar.gz +506c639db4c7e7e0880cb34d931eda12 wt-3.3.0-free.tar.gz diff --git a/wt-3.2.3-PACKAGE-LICENSING b/wt-3.3.0-PACKAGE-LICENSING similarity index 100% rename from wt-3.2.3-PACKAGE-LICENSING rename to wt-3.3.0-PACKAGE-LICENSING diff --git a/wt-generate-tarball.sh b/wt-generate-tarball.sh old mode 100644 new mode 100755 diff --git a/wt.spec b/wt.spec index b9ca54b..12d4f39 100644 --- a/wt.spec +++ b/wt.spec @@ -5,7 +5,7 @@ %global WTRUNGROUP apache Name: wt -Version: 3.2.3 +Version: 3.3.0 Release: 1%{?dist} Summary: C++ library for developing web applications @@ -14,8 +14,8 @@ Group: Development/Libraries License: GPLv2 and Boost and MIT and (Boost or MIT) and BSD and zlib URL: http://www.webtoolkit.eu/wt # Following archive was made from upstream tarball downloaded from -# http://citylan.dl.sourceforge.net/project/witty/wt/3.2.3/wt-3.2.3.tar.gz -# by running generate-tarball.sh 3.2.3 from tarball's directory +# http://citylan.dl.sourceforge.net/project/witty/wt/3.3.0/wt-3.3.0.tar.gz +# by running ./wt-generate-tarball.sh 3.3.0 from tarball's directory Source0: %{name}-%{version}-free.tar.gz Source1: %{name}-%{version}-PACKAGE-LICENSING # wt toolkit contains bundled non-free library (IBPP) that we cannot ship. @@ -185,7 +185,6 @@ popd %files %config(noreplace) %{_sysconfdir}/%{name}/wt_config.xml %{_libdir}/libwt.so.* -%{_libdir}/libwtext.so.* %{_libdir}/libwtfcgi.so.* %{_libdir}/libwthttp.so.* %{_libdir}/libwttest.so.* @@ -238,6 +237,9 @@ popd %{_defaultdocdir}/%{name}-doc-%{version}/examples/* %changelog +* Thu Jun 20 2013 Michal Minar 3.3.0-1 +- Version 3.3.0 + * Wed Dec 26 2012 Michal Minar - 3.2.3-1 - Version 3.2.3