Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # this skeleton spec shows how to build several library subpackages, with different majors for each, all properly libified
- # main library is libfoo and there are two library subpackages (libfoo-bar and libfoo-baz)
- # apart from the normal -devel (and -static) subpackages
- # another example is also ffmpeg: http://svnweb.mageia.org/packages/cauldron/ffmpeg/current/SPECS/ffmpeg.spec?view=markup
- # macros can be easily evaluated outside from the rpm build via
- # rpm -D "libname %mklibname foo 1" -D "name foo" -E "%mklibname %{name}-bar 2"
- %define major 1
- %define libname %mklibname %{name} %major
- %define devname %mklibname %{name} -d
- %define staticname %mklibname %{name} -s -d
- %define barmajor 2
- %define barlibname %mklibname %{name}-bar %{barmajor}
- %define bazmajor 3
- %define bazlibname %mklibname %{name}-baz %{bazmajor}
- Name: foo
- Version: 1.2.3
- Release: %mkrel 1
- Summary:
- License:
- Group:
- URL:
- Source0:
- %description
- %package -n %{libname}
- Summary: Shared library for %{name}
- Group: System/Libraries
- %description -n %{libname}
- Lib%{name} is some %{name} library.
- %package -n %{devname}
- Summary: Development files for lib%{name}
- Group: Development/C
- Requires: %{libname} = %version
- Provides: %{name}-devel = %version-%release
- Provides: lib%{name}-devel = %version-%release
- %description -n %{devname}
- Lib%{name} is some %{name} library.
- This package contains the files for developing applications which
- will use lib%{name}.
- %package -n %{barlibname}
- Summary: Shared library for %{name}
- Group: System/Libraries
- %description -n %{barlibname}
- Lib%{name} is some %{name} library.
- %package -n %{bazlibname}
- Summary: Shared library for %{name}
- Group: System/Libraries
- %description -n %{bazlibname}
- Lib%{name} is some %{name} library.
- %prep
- %build
- %install
- rm -rf %{buildroot}
- %files
- #%{_bindir}/
- %files -n %{libname}
- %{_libdir}/lib%{name}.so.%{major}*
- %files -n %{devname}
- %{_libdir}/lib%{name}.so
- %files -n %{barlibname}
- %{_libdir}/lib%{name}-bar.so.%{major}*
- %files -n %{bazlibname}
- %{_libdir}/lib%{name}-baz.so.%{major}*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement