Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From Mageia policy:
- You must use following command on spec file:
- - %configure2_5x
- instead of:
- %configure or ./configure
- -%configure2_5x \
- --with-pthreads \
- --enable-char-encoding=locale \
- --disable-static
- instead of:
- %configure2_5x --with-pthreads --enable-char-encoding=locale --disable-static
- -%makeinstall_std
- instead of:
- make install (this is fedora's macro)
- -%make
- instead of:
- make (unless the parallell make is broken)
- or
- make %{?_smp_mflags} (this is fedora's macro)
- -%cmake
- instead of:
- mkdir build && cd build
- cmake
- -%makeinstall_std -C build
- instead of:
- cd build
- %makeinstall_std
- -%{_iconsdir}
- instead of:
- %{_datadir}/icons
- -%{_javadir}
- instead of:
- %{_datadir}/java
- -%{_docdir}
- instead of:
- %}_datadir}/doc
- -%{_mandir}
- instead of:
- %{_datadir}/man
- -add a link url for Source's (Always check if URL and Source URL are the last current and the good)
- ex: http://sourceforge.net/projects/%{name}/files/%{name}/%{version}/%{name}-%{version}.tar.gz
- instead of:
- %{name}-%{version}.tar.gz
- -%{_datadir}/%{name}/ (it is better)
- instead of:
- %{_datadir}/%{name}/* (the '*' alone will prevent the removal of the %{name} folder)
- or you use (but must be 2 lines):
- dir %{_datadir}/%{name}/
- %{_datadir}/%{name}/*
- -%apply_patches (only works if in the patch there is the full file path, option -p1 not for -p0)
- instead of:
- Patch0 -p1
- Patch1 -p1
- Patch2 -p1
- Patch3 -p1
- Patch4 -p1
- -When deleted static build you must add two lines (on %install section) : (we do not need the static packages)
- # we don't want these
- find %{buildroot} -name '*.la' -delete
- -for library packages (an example):
- %define major 3
- %define libname %mklibname %{name}_ %{major}
- %define develname %mklibname %{name} -d
- -BuildRequires: pkgconfig(ffms2)
- instead of:
- BuildRequires: ffms2-devel
- to find if pkgconfig is available you can use:
- urpmq --provides lib64ffms2-devel or urpmq --provides libffms2-devel
- -%find_lang %{name} (when you use this command add this one on %files section too) (only used for .mo files on /usr/share/locale)
- %files -f %{name}.lang
- -f %{name}.lang (this command does not install all the languages of software on your system, it will look for the file '/etc/rpm/macros' and install only languages allowed in this file, especially if there is, for example, 100 different translations)
- -%{qt4bin}/lrelease translation/*.ts or %{qt4bin}/lrelease i18n/*.ts
- instead of
- export PATH=$PATH:%{_libdir}/qt4/bin
- lrelease translation/*.ts
- or
- %{_prefix}/%{_lib}/qt4/bin/lrelease translation/*.ts or %{_prefix}/%{_lib}/qt4/bin/lrelease i18n/*.ts
- -%{__python} setup.py build
- instead of:
- python setup.py build
- -%{__python} setup.py install --root=%{buildroot} --skip-build
- instead of:
- python setup.py install -O1 --skip-build --prefix=%{_prefix} --root=%{buildroot}
- -desktop-file-install (add desktop-file-utils on BR)
- desktop-file-install \
- --dir=%{buildroot}%{_datadir}/applications/ \
- --remove-key=Encoding \
- --set-key=Keywords --set-value='PGN;FEN;Database;' \
- --set-key=Keywords[de] --set-value='PGN;FEN;Datenbank;' \
- --remove-key=Comment \
- --set-icon=%{name} \
- unix/%{name}.desktop
- -desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement