[Bug 1418157] Review Request: hypatia - A pure-C math library for 2D/ 3D graphics (matrix, vector, quaternion)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1418157



--- Comment #1 from Michael Schwendt <bugs.michael@xxxxxxx> ---
> Help:
> I wish I had a successful koji build, but I can't get past this error.
> Please advise:
> `/var/tmp/rpm-tmp.Fklvv2: line 31: fg: no job control`

Since the koji buildroots (using Mock) are more minimal, you're missing
"BuildRequires: cmake".


> Summary:	A pure-C math library for 2D/3D graphics (matrix, vector, quaternion)

These leading articles are not only superfluous, they are really *really* ugly
in almost every package tool that displays these summaries in a list.

  https://fedoraproject.org/wiki/Examples_of_good_package_summaries
  https://fedoraproject.org/wiki/Packaging:Guidelines#Summary_and_description

Also, I would advise against trying to squeeze details into the %summary
instead of the %description. If it's a C library, it can be convenient to
mention that in the summary, but whether it's "pure C" is a minor detail to
expand on in the description. As one could argue about good summaries for a
long time, I suggest:

  Summary: C library for mathematics in 2D/3D graphics


> Group:		System Environment/Libraries

https://fedoraproject.org/wiki/Packaging:Guidelines#Tags_and_Sections


> %package	devel
> Requires:	%{name} = %{version}-%{release}

https://fedoraproject.org/wiki/Packaging:Guidelines#Requiring_Base_Package


> This package contains the header files, static libraries and development

https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries


> %package	doc
> Summary:	Development documentation for %{name}
> Group:		Development/Libraries

If at all, it would be "Group: Documentation". The group tag is optional for a
long time, however.


> Requires:	%{name}-devel = %{version}-%{release}

Certainly wrong. HTML documentation does not need the -devel package to be
present. Please keep separate -doc packages free of dependencies. Unless the
-doc files are in a special format and need the base program to display them.


> %description	doc
> This package contains the development documentation for %{name}.
> If you like to develop programs using %{name}-devel, you will
> need to install %{name}-doc.

This "you will need to" sounds like a "have to". Just describe the package
contents and leave it to the reader whether to install the package or whether
to copy files from it.

  %description    doc
  This package contains documentation for developing with %{n
ame}.

The %description of the -devel package is similar. Many -devel packages simply
describe what they include and leave it to the reader whether to install the
package for doing development themselves or building something someone else has
developed:

  %description  devel
  This package contains the header files and library for developing
  with %{name}.


> %check
> ctest -V %{?_smp_mflags}

During rpmbuild, the %check section is executed _after_ %install, also because
it may be necessary to test files installed into the %buildroot. Putting %check
after %install in the spec file is the more logical choice.


> %clean
> rm -rf $RPM_BUILD_ROOT

Similarly here. The %clean section is executed last, and it should not be
redefined unless you really need to override the default:

https://fedoraproject.org/wiki/Packaging:Guidelines#Tags_and_Sections


> %install
> rm -rf $RPM_BUILD_ROOT

https://fedoraproject.org/wiki/Packaging:Guidelines#Tags_and_Sections


> %files
> %defattr(-,root,root,0755)

https://fedoraproject.org/wiki/Packaging:Guidelines#File_Permissions


> %doc README.md
> %{_libdir}/libhypatia*.so.*

https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text


> %dir %{_includedir}/hypatia
> %{_includedir}/hypatia/*.h
> %{_includedir}/hypatia/*.hpp

These three lines with wildcards could be replaced with just one line:

  %{_includedir}/hypatia/

Note that the trailing '/' is optional but increases readability as it suggests
that this is a directory.


> %{_libdir}/libhypatia.a

https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries


> %files doc
> %defattr(-,root,root,0644)

Same as above. Also, the file permissions in this package are wrong. Run "rpmls
-p hypatia-doc-1.0.0-1.fc25.noarch.rpm|grep ^d" to see.


> %dir %{_docdir}/%{name}
> %dir %{_docdir}/%{name}/html
> %{_docdir}/%{name}/html/*

Same as above with the header files. If you include entire directory trees,
simply specify the directory itself. 

Do note, however, that you share %{_docdir}/%{name} with the base library
package, and that may require more efforts, because it has not been
trouble-free on older platforms when using the %doc macro.


> "config.h"
> #include "config.h"

It is inconvenient to rip this out of the "hypatia" namespace by expecting the
compiler to find it directly in headers search path. Any program using its own
"config.h" file (such as when using the GNU Autotools defaults) will have
problems including the right one. Better have your API users do

  #include <hypatia/hypatia.h>

and be explicit about the "hypatia" directory.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]