packaging: added spec file template.
authorJaska Uimonen <jaska.uimonen@helsinki.fi>
Wed, 6 Jun 2012 14:48:40 +0000 (17:48 +0300)
committerJaska Uimonen <jaska.uimonen@helsinki.fi>
Fri, 8 Jun 2012 19:27:52 +0000 (22:27 +0300)
audiomanager.spec.in [new file with mode: 0644]

diff --git a/audiomanager.spec.in b/audiomanager.spec.in
new file mode 100644 (file)
index 0000000..6cdf082
--- /dev/null
@@ -0,0 +1,73 @@
+Name:             audiomanager
+License:          Mozilla Public License 2.0
+Group:            System/Daemons
+Summary:          AudioManager
+Version:          0.0.@VERSION@
+Release:          0
+Source:           %{name}-@VERSION@.tar.gz
+@DECLARE_PATCHES@
+#BuildRequires:    pkgconfig(automotive-dlt)
+BuildRequires:    pkgconfig(sqlite3)
+BuildRequires:    pkgconfig(dbus-1)
+BuildRequires:    cmake
+Requires(post):   /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description
+Automotive AudioManager
+
+%package devel
+License:         Mozilla Public License 2.0
+Summary:         Automotive AudioManager Development Package
+Group:           System/Development
+Requires:        %{name} = %{version}-%{release}
+
+%description devel
+Files needed for developing against the Automotive AudioManager
+
+%prep
+%setup -q -n %{name}-@VERSION@
+@APPLY_PATCHES@
+
+%build
+mkdir build
+cd build
+
+case %{_arch} in
+    *64) libdir=lib64;;
+    *)   libdir=lib;;
+esac
+
+cmake -DWITH_TESTS=OFF -DUSE_BUILD_LIBS=OFF -DWITH_DLT=OFF -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=$libdir ..
+make %{?jobs:-j %jobs}
+
+%install
+rm -rf "$RPM_BUILD_ROOT"
+cd build
+make install DESTDIR=$RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+%files
+%defattr(-,root,root,-)
+%{_bindir}/AudioManager
+%{_libdir}/audioManager/command/*.so.*
+%{_libdir}/audioManager/control/*.so.*
+%{_libdir}/audioManager/routing/*.so.*
+%{_libdir}/audioManager/command/*.so
+%{_libdir}/audioManager/control/*.so
+%{_libdir}/audioManager/routing/*.so
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/*.h
+%{_includedir}/command/*.h
+%{_includedir}/control/*.h
+%{_includedir}/routing/*.h
+%{_includedir}/shared/*.h
+%{_libdir}/pkgconfig/*.pc