]>
Commit | Line | Data |
---|---|---|
f5c4e739 ER |
1 | # TODO |
2 | # - cmake is borken and adds objects (static libs) in the middle of lists (Renderer/libRenderer.a): | |
3 | # Linking CXX shared library libprojectM.so | |
4 | # /usr/bin/cmake -E cmake_link_script CMakeFiles/projectM-shared.dir/link.txt --verbose=1 | |
5 | # /usr/bin/ccache i686-pld-linux-g++ -fPIC -O2 -fno-strict-aliasing -fwrapv -march=i686 -mtune=pentium4 -gdwarf-3 -g2 -fopenmp -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc -shared -Wl,-soname,libprojectM.so.2 -o libprojectM.so.2.0.1 CMakeFiles/projectM-shared.dir/projectM.cpp.o CMakeFiles/projectM-shared.dir/PCM.cpp.o CMakeFiles/projectM-shared.dir/Preset.cpp.o CMakeFiles/projectM-shared.dir/fftsg.cpp.o CMakeFiles/projectM-shared.dir/KeyHandler.cpp.o CMakeFiles/projectM-shared.dir/timer.cpp.o CMakeFiles/projectM-shared.dir/wipemalloc.cpp.o CMakeFiles/projectM-shared.dir/PresetLoader.cpp.o CMakeFiles/projectM-shared.dir/PresetChooser.cpp.o CMakeFiles/projectM-shared.dir/PipelineMerger.cpp.o CMakeFiles/projectM-shared.dir/ConfigFile.cpp.o CMakeFiles/projectM-shared.dir/TimeKeeper.cpp.o CMakeFiles/projectM-shared.dir/PresetFactory.cpp.o CMakeFiles/projectM-shared.dir/PresetFactoryManager.cpp.o Renderer/libRenderer.a NativePresetFactory/libNativePresetFactory.a MilkdropPresetFactory/libMilkdropPresetFactory.a -lGLEW -lftgl -lfreetype -lGLU -lGL -lSM -lICE -lX11 -lXext Renderer/libRenderer.a -lm | |
6 | # | |
7 | # CMakeLists.txt having: | |
8 | # TARGET_LINK_LIBRARIES(projectM-shared ${PRESET_FACTORY_LINK_TARGETS} ${GLEW_LINK_TARGETS} m dl ${FTGL_LINK_TARGETS} ${OPENGL_LIBRARIES} ${IMAGE_LINK_TARGETS} ${CG_LINK_TARGETS}) | |
9 | # | |
10 | # NativePresetFactory/CMakeLists.txt has: | |
11 | # TARGET_LINK_LIBRARIES(NativePresetFactory Renderer m) | |
12 | # which mixes .a between -l for dl | |
13 | ||
7b127198 | 14 | %define pkgname projectM |
b3a82913 | 15 | Summary: Awesome music visualizer |
16 | Summary(pl.UTF-8): Imponujący wizualizator muzyki | |
79f740dd | 17 | Name: libprojectM |
7b127198 | 18 | Version: 2.0.1 |
10672d0a | 19 | Release: 3 |
470af845 | 20 | Epoch: 1 |
b3a82913 | 21 | License: LGPL |
22 | Group: Libraries | |
7b127198 ER |
23 | Source0: http://downloads.sourceforge.net/project/projectm/%{version}/projectM-%{version}-Source.tar.gz |
24 | # Source0-md5: f8bf795878cdbbef54784cf2390b4c89 | |
25 | Patch0: %{name}-soname.patch | |
26 | Patch1: %{name}-fonts.patch | |
27 | Patch2: %{name}-static.patch | |
f5c4e739 | 28 | Patch3: as-needed.patch |
10672d0a | 29 | Patch4: %{name}-pkgconfig.patch |
729cd339 | 30 | URL: http://projectm.sourceforge.net/ |
79f740dd | 31 | BuildRequires: cmake |
a37d40a9 | 32 | BuildRequires: ftgl-devel >= 2.1.3 |
77f5004b | 33 | BuildRequires: glew-devel |
79f740dd | 34 | BuildRequires: pkgconfig |
7b127198 ER |
35 | BuildRequires: rpmbuild(macros) >= 1.566 |
36 | BuildRequires: sed >= 4.0 | |
37 | Requires: fonts-TTF-bitstream-vera | |
b3a82913 | 38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
f5c4e739 ER |
40 | # cmake (or cmake rules) are broken, mixes .a (objects) with libs (-l) |
41 | %define filterout_ld -Wl,--as-needed | |
42 | ||
b3a82913 | 43 | %description |
44 | projectM is a reimplementation of Milkdrop under OpenGL. It is an | |
45 | awesome music visualizer. There is nothing better in the world of | |
46 | Unix. | |
47 | ||
77f5004b | 48 | %description -l pl.UTF-8 |
0d2ffbdb | 49 | projectM jest reimplementacją projektu Milkdrop na OpenGL. Jest |
50 | imponującym wizualizatorem muzyki. Nie ma nic lepszego w świecie | |
51 | uniksa. | |
52 | ||
b3a82913 | 53 | %package devel |
54 | Summary: Header files for projectM library | |
55 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki projectM | |
56 | Group: Development/Libraries | |
93c14781 | 57 | Requires: %{name} = %{epoch}:%{version}-%{release} |
b3a82913 | 58 | |
59 | %description devel | |
60 | Header files for projectM library. | |
61 | ||
62 | %description devel -l pl.UTF-8 | |
63 | Pliki nagłówkowe biblioteki projectM. | |
64 | ||
65 | %package static | |
66 | Summary: Static projectM library | |
67 | Summary(pl.UTF-8): Statyczna biblioteka projectM | |
68 | Group: Development/Libraries | |
93c14781 | 69 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
b3a82913 | 70 | |
71 | %description static | |
72 | Static projectM library. | |
73 | ||
74 | %description static -l pl.UTF-8 | |
75 | Statyczna biblioteka projectM. | |
76 | ||
77 | %prep | |
7b127198 ER |
78 | %setup -q -n projectM-%{version}-Source |
79 | %undos config.inp.in | |
79f740dd | 80 | %patch0 -p1 |
a37d40a9 AG |
81 | %patch1 -p1 |
82 | %patch2 -p1 | |
f5c4e739 | 83 | %patch3 -p1 |
10672d0a | 84 | %patch4 -p1 |
b3a82913 | 85 | |
86 | %build | |
79f740dd | 87 | %cmake \ |
88 | -DCMAKE_INSTALL_PREFIX=%{_prefix} \ | |
10672d0a | 89 | -DCMAKE_LIB_DIR=%{_libdir} \ |
a37d40a9 | 90 | -DBUILD_PROJECTM_STATIC=yes \ |
216b1c50 | 91 | %if "%{_lib}" == "lib64" |
92 | -DLIB_SUFFIX=64 \ | |
93 | %endif | |
55543586 | 94 | . |
77f5004b | 95 | %{__make} |
b3a82913 | 96 | |
97 | %install | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %{__make} install \ | |
101 | DESTDIR=$RPM_BUILD_ROOT | |
102 | ||
103 | %clean | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %post -p /sbin/ldconfig | |
107 | %postun -p /sbin/ldconfig | |
108 | ||
109 | %files | |
110 | %defattr(644,root,root,755) | |
111 | %doc ChangeLog | |
216b1c50 | 112 | %attr(755,root,root) %{_libdir}/libprojectM.so.*.* |
7b127198 ER |
113 | %attr(755,root,root) %ghost %{_libdir}/libprojectM.so.2 |
114 | %dir %{_datadir}/%{pkgname} | |
115 | %{_datadir}/%{pkgname}/config.inp | |
116 | %dir %{_datadir}/%{pkgname}/presets | |
117 | %{_datadir}/%{pkgname}/presets/*.milk | |
118 | %{_datadir}/%{pkgname}/presets/*.prjm | |
119 | %{_datadir}/%{pkgname}/presets/*.tga | |
120 | %dir %{_datadir}/%{pkgname}/shaders | |
121 | %{_datadir}/%{pkgname}/shaders/*.cg | |
b3a82913 | 122 | |
123 | %files devel | |
124 | %defattr(644,root,root,755) | |
216b1c50 | 125 | %attr(755,root,root) %{_libdir}/libprojectM.so |
79f740dd | 126 | %{_includedir}/%{name} |
b3a82913 | 127 | %{_pkgconfigdir}/libprojectM.pc |
128 | ||
129 | %files static | |
130 | %defattr(644,root,root,755) | |
131 | %{_libdir}/libprojectM.a |