From Fedora Project Wiki

CompileFLags

Compiler Flags Explained

|| flag || reason || ||<#80FF80> -g || Produces debugging information that will be stored in the -debuginfo package || ||<#80FF80> -Wall || Makes gcc display warnings about questionable constructs in the code, when gcc prints error, please report them upstream || ||<#80FF80> -fstack-protector || Adds stack protection to the binary, see: [wiki:Self:Security/Features#head-58c7594cdcb36e04c558f0c6d3914c35bcc9553e Stack protection] || ||<#FF8080> -fomit-frame-pointer || Destroys debuging information on some machines, when it is safe to use, it is already in -O3 ||

Packaging

python

{{{ %prep %setup -q -n %{name}-%{version}


%build python setup.py build


%install rm -rf $RPM_BUILD_ROOT mkdir $RPM_BUILD_ROOT

python setup.py install --skip-build --root $RPM_BUILD_ROOT }}}

Haskell

tr --delete .)

%define cabalsetup Setup.lhs

  1. There is no debuginfo for Haskell files currently

%define debug_package %{nil}

Requires:  %{ghcver}-%{name}

  1. There is no Haskell or ghc for ppc64 in Fedora
  2. Bugs:
  3. https://bugzilla.redhat.com/239713 (ghc ppc64)

ExcludeArch: ppc64


%package -n %{ghcver}-%{name} Summary: :TODO: Group: Development/Libraries Requires(preun): %{_bindir}/ghc-pkg-%{ghc_version} Requires(post):  %{_bindir}/ghc-pkg-%{ghc_version}


%build runhaskell %{cabalsetup} configure \

          --with-compiler=%{_bindir}/ghc-%{ghc_version} \
          --prefix=%{_prefix} \
          --bindir=%{_bindir} \
          --datadir=%{_datadir} \
          --libdir=%{_libdir} \
          --libexecdir=%{_libexecdir}

runhaskell %{cabalsetup} build


%install rm -rf $RPM_BUILD_ROOT runhaskell %{cabalsetup} copy --destdir=$RPM_BUILD_ROOT

install .installed-pkg-config $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/ghc-%{ghc_version}/%{name}.pkg

%post -n %{ghcver}-%{name} ghc-pkg-%{ghc_version} -u -g -i %{_libdir}/%{name}-%{version}/ghc-%{ghc_version}/%{name}.pkg


%preun -n %{ghcver}-%{name} if [ "$1" = 0 ]; then

 rm -f %{_libdir}/%{name}-%{version}/*.o
 ghc-pkg-%{ghc_version} -r %{name}-%{version} 

Old: {{{ ghc-pkg-%{ghc_version} -u -g -i %{_libdir}/%{name}-%{version}/ghc-%{ghc_version}/%{name}.pkg }}} New: {{{ ghc-pkg-%{ghc_version} --auto-ghci-libs update %{_libdir}/%{name}-%{version}/ghc-%{ghc_version}/%{name}.pkg &> /dev/null }}}

Old:

New:


Review Checklist

Review Checklist

* rpmlint
* naming
 * NamingGuidelines
* licensing
 * osi approved?
 * included?
 * correct mentioned in specfile?
 specfile
 * American English
 * legible
 * ExcludeArch, blocking
 * BuildRequires
 * Locales
 * shared libraries: ldconfig
 * %clean section with rm -rf ${RPM_BUILD_ROOT}
 * macros
* sources
* relocatable? Prefix: /usr?
* files and directories
 * owns all created directories
 * all files listed in %files
 * permissions?
 * deffattr?
 * no .la files
 * .desktop for GUI applications
 * no conflicts with other packets
* -devel
 * headers
 * static libraries
 * .so without suffix when .so.suffix existent
 * .pc files
* permissable content
* doc
 * large doc in -doc package
 * must not affect runtime
* request upstream license
* mock build
* sane scriptlets
* subpackages with fully versioned dependency

Sandbox

||<tableclass="message warning3"> Information on this page is deprecated, please look at [:PackageMaintainers/Join#head-289ccb147e1de03b5f8d8b9ffe99709227b454cc: How to join the Fedora Package Collection Maintainers] ||

WikiHowto

Smileys || (!) || {{{ (!) }}} || || <!> || {{{ <!> }}} || || {i} || {{{ {i} }}} || || {X} || {{{ {X} }}} || || /!\ || {{{ /!\ }}} || || (./) || {{{ (./) }}} ||


||<tableclass="message warning"> This is a {{{<tableclass="message warning">}}} table ||


||<tableclass="message warning1"> This is a {{{<tableclass="message warning1">}}} class table (do not use)||

||<tableclass="message warning2"> This is a {{{<tableclass="message warning2">}}} class table ||

||<tableclass="message warning3"> This is a {{{<tableclass="message warning3">}}} class table ||

||<tableclass="message warning4"> This is a {{{<tableclass="message warning4">}}} class table (do not use)||

||<tableclass="this class does not exist yet23"> This is a {{{<tableclass="this class does not exist yet23">}}} class table (do not use)||