| 1 | # The default OS/2 Toolkit path, use --define to override on the command line
|
|---|
| 2 | %if %{undefined os2_toolkit_path}
|
|---|
| 3 | %define os2_toolkit_path D:/Tools/OS2TK45
|
|---|
| 4 | %endif
|
|---|
| 5 |
|
|---|
| 6 | Summary: K Audio Interface library for OS/2 multimedia subsystem
|
|---|
| 7 | Name: libkai
|
|---|
| 8 | Version: 1.1.4
|
|---|
| 9 | Release: 1%{?dist}
|
|---|
| 10 | License: LGPLv2+
|
|---|
| 11 | Group: System Environment/Libraries
|
|---|
| 12 |
|
|---|
| 13 | %define github_name kai
|
|---|
| 14 | %define github_url https://github.com/komh/%{github_name}/archive
|
|---|
| 15 | %define github_rev kai-%{version}
|
|---|
| 16 |
|
|---|
| 17 | Source: %{github_name}-%{github_rev}.zip
|
|---|
| 18 |
|
|---|
| 19 | BuildRequires: gcc make curl zip
|
|---|
| 20 |
|
|---|
| 21 | %description
|
|---|
| 22 | K Audio Interface is a frontend library that simplifies access to OS/2
|
|---|
| 23 | audio hardware making it easier to write programs that play sounds.
|
|---|
| 24 | Currently, it supports playing sounds through the standard OS/2
|
|---|
| 25 | MMPM/DART subsystem and through the UNIAUD driver directly.
|
|---|
| 26 |
|
|---|
| 27 | %package devel
|
|---|
| 28 | Summary: K Audio Interface developer package
|
|---|
| 29 | Group: Development/Libraries
|
|---|
| 30 | Requires: libkai = %{version}-%{release}
|
|---|
| 31 |
|
|---|
| 32 | %description devel
|
|---|
| 33 | Contains headers and libraries necessary to compile audio-enabled
|
|---|
| 34 | applications that use K Audio Interface.
|
|---|
| 35 |
|
|---|
| 36 | %package static
|
|---|
| 37 | Summary: K Audio Interface static library
|
|---|
| 38 | Group: Development/Libraries
|
|---|
| 39 | Requires: libkai-devel = %{version}-%{release}
|
|---|
| 40 |
|
|---|
| 41 | %description static
|
|---|
| 42 | Contains headers the static K Audio Interface library.
|
|---|
| 43 |
|
|---|
| 44 | %package debug
|
|---|
| 45 | Summary: HLL debug data for libkai
|
|---|
| 46 | Requires: libkai = %{version}-%{release}
|
|---|
| 47 |
|
|---|
| 48 | %description debug
|
|---|
| 49 | Contains symbol files necessary to generate proper crash reports
|
|---|
| 50 | in applications using the libkai package.
|
|---|
| 51 |
|
|---|
| 52 | %prep
|
|---|
| 53 | %if %(sh -c 'if test -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip" ; then echo 1 ; else echo 0 ; fi')
|
|---|
| 54 | %setup -n "%{github_name}-%{github_rev}" -q
|
|---|
| 55 | %else
|
|---|
| 56 | %setup -n "%{github_name}-%{github_rev}" -Tc
|
|---|
| 57 | rm -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
|
|---|
| 58 | curl -sSL "%{github_url}/%{github_rev}.zip" -o "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
|
|---|
| 59 | unzip "%{_sourcedir}/%{github_name}-%{github_rev}.zip" -d ..
|
|---|
| 60 | %endif
|
|---|
| 61 |
|
|---|
| 62 | %build
|
|---|
| 63 | make PREFIX=%{_prefix} CC="gcc -idirafter %{os2_toolkit_path}/h -DOS2EMX_PLAIN_CHAR"
|
|---|
| 64 |
|
|---|
| 65 | %install
|
|---|
| 66 | make PREFIX=%{_prefix} INSTALL=%{_bindir}/install DESTDIR=%{buildroot} install
|
|---|
| 67 | # No need in .a once we have .lib
|
|---|
| 68 | rm -f %{buildroot}/%{_libdir}/*.a
|
|---|
| 69 |
|
|---|
| 70 | %clean
|
|---|
| 71 | rm -rf %{buildroot}
|
|---|
| 72 |
|
|---|
| 73 | %files
|
|---|
| 74 | %defattr(-,root,root)
|
|---|
| 75 | %{_libdir}/*.dll
|
|---|
| 76 |
|
|---|
| 77 | %files devel
|
|---|
| 78 | %defattr(-,root,root)
|
|---|
| 79 | %{_includedir}/*.h
|
|---|
| 80 | %{_libdir}/*_dll.lib
|
|---|
| 81 |
|
|---|
| 82 | %files static
|
|---|
| 83 | %defattr(-,root,root)
|
|---|
| 84 | %exclude %{_libdir}/*_dll.lib
|
|---|
| 85 | %{_libdir}/*.lib
|
|---|
| 86 |
|
|---|
| 87 | %files debug
|
|---|
| 88 | %defattr(-,root,root)
|
|---|
| 89 | %{_libdir}/*.dbg
|
|---|
| 90 |
|
|---|
| 91 | %changelog
|
|---|
| 92 | * Wed Jul 1 2015 Dmitriy Kuminov <coding@dmik.org> 1.1.4-1
|
|---|
| 93 | - Initial package for version 1.1.4.
|
|---|