diff --git a/.gitignore b/.gitignore index e69de29..68efe9d 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/brewtarget_1.2.5.orig.tar.gz diff --git a/brewtarget.desktopsemicolon.patch b/brewtarget.desktopsemicolon.patch new file mode 100644 index 0000000..6f51f1c --- /dev/null +++ b/brewtarget.desktopsemicolon.patch @@ -0,0 +1,9 @@ +--- brewtarget-1.2.5/brewtarget.desktop.in.orig 2012-07-14 11:49:41.000000000 -0600 ++++ brewtarget-1.2.5/brewtarget.desktop.in 2012-11-12 18:09:36.665509887 -0700 +@@ -1,5 +1,5 @@ + [Desktop Entry] +-Categories=Qt;KDE;Education;Utility;Engineering ++Categories=Qt;KDE;Education;Utility;Engineering; + Exec=brewtarget + Name=Brewtarget + GenericName=Beer calculator diff --git a/brewtarget.docdirfix.patch b/brewtarget.docdirfix.patch new file mode 100644 index 0000000..07e50d5 --- /dev/null +++ b/brewtarget.docdirfix.patch @@ -0,0 +1,11 @@ +--- brewtarget-1.2.5/CMakeLists.txt.orig 2012-07-14 11:49:41.000000000 -0600 ++++ brewtarget-1.2.5/CMakeLists.txt 2012-11-12 17:56:52.131360768 -0700 +@@ -139,7 +139,7 @@ + IF( UNIX AND NOT APPLE ) + SET( DATAPATH "${DATAROOTDIR}/${CMAKE_PROJECT_NAME}" ) + SET( TARGETPATH ${BINDIR} ) +- SET( DOCPATH ${DOCDIR} ) ++ SET( DOCPATH ${DOCDIR}-${brewtarget_VERSION_STRING} ) + ELSEIF( WIN32 ) + # Works for regular "make install", but not CPack/NSIS installer. + #SET( CMAKE_INSTALL_PREFIX "C:/Program Files/brewtarget-${brewtarget_VERSION_STRING}" ) diff --git a/brewtarget.functionwithoutdocs.patch b/brewtarget.functionwithoutdocs.patch new file mode 100644 index 0000000..fe9055e --- /dev/null +++ b/brewtarget.functionwithoutdocs.patch @@ -0,0 +1,13 @@ +--- brewtarget-1.2.5/src/brewtarget.cpp.orig 2012-11-12 23:00:51.379511289 -0700 ++++ brewtarget-1.2.5/src/brewtarget.cpp 2012-11-12 23:01:45.379472819 -0700 +@@ -112,8 +112,8 @@ + { + QMessageBox::information(0, + QObject::tr("Directory Problem"), +- QObject::tr("\"%1\" cannot be read.").arg(dir.path())); +- return false; ++ QObject::tr("\"%1\" cannot be read. Manual will not be available.").arg(dir.path())); ++ return true; + } + + dir.setPath(getConfigDir(&success)); diff --git a/brewtarget.spec b/brewtarget.spec new file mode 100644 index 0000000..b569a0d --- /dev/null +++ b/brewtarget.spec @@ -0,0 +1,76 @@ +Name: brewtarget +Version: 1.2.5 +Release: 4%{?dist} +Summary: An open source beer recipe creation tool +Group: Applications/Productivity +License: GPLv3 and WTFPL and LGPLv2 +URL: http://www.brewtarget.org +Source0: http://sourceforge.net/projects/brewtarget/files/brewtarget/1.2/%{version}/brewtarget_%{version}.orig.tar.gz + +# Reported upstream at https://sourceforge.net/tracker/?func=detail&aid=3586479&group_id=249733&atid=1126483 +Patch0: brewtarget.desktopsemicolon.patch +# Reported upstream at https://sourceforge.net/tracker/?func=detail&aid=3586539&group_id=249733&atid=1126483 +Patch1: brewtarget.docdirfix.patch +# emailed upstream Nov 12 2012 +Patch2: brewtarget.functionwithoutdocs.patch + +BuildRequires: cmake +BuildRequires: qt-devel +BuildRequires: qt-webkit-devel +BuildRequires: phonon-devel +BuildRequires: desktop-file-utils +%description +Brewtarget is an open source beer recipe creation tool. It automatically +calculates color, bitterness, and other parameters for you while you drag and +drop ingredients into the recipe. Brewtarget also has many other tools such as +priming sugar calculators, OG correction help, and a unique mash designing tool. +It also can export and import recipes in BeerXML. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +%build +%cmake -DDO_RELEASE_BUILD:BOOL=ON +make %{?_smp_mflags} + + +%install +make VERBOSE=1 INSTALL="install -p" CP="cp -p" DESTDIR=%{buildroot} install +/usr/bin/install -m 0644 -Dp doc/brewtarget.1 %buildroot%{_mandir}/man1/brewtarget.1 +desktop-file-validate %buildroot%{_datadir}/applications/%{name}.desktop + +%files +%{_bindir}/%{name} +%{_datadir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/icons/%{name} +%{_mandir}/man1/brewtarget.1* +%doc README COPYRIGHT COPYING.GPLv3 COPYING.WTFPL doc/manual/index.html + + + +%changelog +* Sun Nov 18 2012 Pete Travis 1.2.3-4 +- Fixing permissions on manpage + +* Sat Nov 17 2012 Pete Travis 1.2.5-3 +- Including bundled manpage, updating SPEC + +* Fri Nov 16 2012 Pete Travis 1.2.5-2 +- Changes to SPEC file per packaging guidelines. + +* Mon Nov 12 2012 Pete Travis 1.2.5-1 +- Initial build of 1.2.5 release + +* Mon Nov 12 2012 Pete Travis 1.2.5-1 +- Added patch to correct .desktop file + +* Mon Nov 12 2012 Pete Travis 1.2.5-1 +- Added patch to install documentation to appropriate directory + +* Mon Nov 12 2012 Pete Travis 1.2.5-1 +- Patching to warn if no documentation instead of exit. + diff --git a/sources b/sources index e69de29..49438e7 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +6122f2358beda23f1da4fbe2f4909b24 brewtarget_1.2.5.orig.tar.gz