Advertisement
Guest User

Untitled

a guest
Feb 4th, 2016
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # this skeleton spec shows how to build several library subpackages, with different majors for each, all properly libified
  2. # main library is libfoo and there are two library subpackages (libfoo-bar and libfoo-baz)
  3. # apart from the normal -devel (and -static) subpackages
  4. # another example is also ffmpeg: http://svnweb.mageia.org/packages/cauldron/ffmpeg/current/SPECS/ffmpeg.spec?view=markup
  5.  
  6. # macros can be easily evaluated outside from the rpm build via
  7. # rpm -D "libname %mklibname foo 1" -D "name foo" -E "%mklibname %{name}-bar 2"
  8.  
  9. %define major 1
  10. %define libname %mklibname %{name} %major
  11. %define devname %mklibname %{name} -d
  12. %define staticname %mklibname %{name} -s -d
  13.  
  14. %define barmajor 2
  15. %define barlibname %mklibname %{name}-bar %{barmajor}
  16.  
  17. %define bazmajor 3
  18. %define bazlibname %mklibname %{name}-baz %{bazmajor}
  19.  
  20. Name:       foo
  21. Version:    1.2.3
  22. Release:    %mkrel 1
  23. Summary:   
  24. License:   
  25. Group:     
  26. URL:       
  27. Source0:   
  28.  
  29. %description
  30.  
  31.  
  32. %package -n %{libname}
  33. Summary: Shared library for %{name}
  34. Group: System/Libraries
  35.  
  36. %description -n %{libname}
  37. Lib%{name} is some %{name} library.
  38.  
  39.  
  40. %package -n %{devname}
  41. Summary: Development files for lib%{name}
  42. Group: Development/C
  43. Requires: %{libname} = %version
  44. Provides: %{name}-devel = %version-%release
  45. Provides: lib%{name}-devel = %version-%release
  46.  
  47. %description -n %{devname}
  48. Lib%{name} is some %{name} library.
  49.  
  50. This package contains the files for developing applications which
  51. will use lib%{name}.
  52.  
  53.  
  54. %package -n %{barlibname}
  55. Summary: Shared library for %{name}
  56. Group: System/Libraries
  57.  
  58. %description -n %{barlibname}
  59. Lib%{name} is some %{name} library.
  60.  
  61.  
  62. %package -n %{bazlibname}
  63. Summary: Shared library for %{name}
  64. Group: System/Libraries
  65.  
  66. %description -n %{bazlibname}
  67. Lib%{name} is some %{name} library.
  68.  
  69.  
  70. %prep
  71.  
  72.  
  73. %build
  74.  
  75.  
  76. %install
  77. rm -rf %{buildroot}
  78.  
  79.  
  80. %files
  81. #%{_bindir}/
  82.  
  83. %files -n %{libname}
  84. %{_libdir}/lib%{name}.so.%{major}*
  85.  
  86. %files -n %{devname}
  87. %{_libdir}/lib%{name}.so
  88.  
  89. %files -n %{barlibname}
  90. %{_libdir}/lib%{name}-bar.so.%{major}*
  91.  
  92. %files -n %{bazlibname}
  93. %{_libdir}/lib%{name}-baz.so.%{major}*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement