cdemu-client-vl.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
  2. %global python_module_name cdemu
  3. Summary: A simple command-line client to control CDEmu daemon
  4. Summary(ja): CDEmu デーモンを制御するシンプルなコマンドラインクライアント
  5. Name: cdemu-client
  6. Version: 3.1.0
  7. Release: 1%{?_dist_release}
  8. License: GPLv2+
  9. Group: Applications/Accessories
  10. URL: http://cdemu.sourceforge.net
  11. Source: http://downloads.sourceforge.net/cdemu/%{name}-%{version}.tar.bz2
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  13. BuildArch: noarch
  14. BuildRequires: cmake >= 2.8.5
  15. BuildRequires: gettext >= 0.15
  16. BuildRequires: intltool >= 0.21
  17. BuildRequires: desktop-file-utils
  18. %description
  19. This is cdemu-client, a simple command-line client for controlling CDEmu daemon.
  20. It is part of the userspace-cdemu suite, a free, GPL CD/DVD-ROM device emulator
  21. for linux.
  22. It provides a way to perform the key tasks related to controlling the CDEmu
  23. daemon, such as loading and unloading devices, displaying devices' status and
  24. retrieving/setting devices' debug masks.
  25. %prep
  26. %setup -q
  27. %build
  28. %cmake \
  29. -DPOST_INSTALL_HOOKS=OFF \
  30. .
  31. %{__make} %{?_smp_mflags}
  32. %install
  33. %{__rm} -rf %{buildroot}
  34. %{__mkdir_p} %{buildroot}%{_bindir}
  35. %{__install} -m0755 src/cdemu %{buildroot}%{_bindir}
  36. %{__mkdir_p} %{buildroot}%{_mandir}/man1
  37. %{__install} -m0644 man/cdemu.1 %{buildroot}%{_mandir}/man1
  38. %{__mkdir_p} %{buildroot}%{_sysconfdir}/bash_completion.d
  39. %{__install} -m0644 data/cdemu-bash-completion.sh %{buildroot}%{_sysconfdir}/bash_completion.d
  40. %{__mkdir_p} %{buildroot}%{_datadir}/pixmaps
  41. %{__install} -m0644 data/cdemu-client.svg %{buildroot}%{_datadir}/pixmaps
  42. %{__mkdir_p} %{buildroot}/%{_datadir}/applications
  43. %{_bindir}/desktop-file-install --dir=%{buildroot}/%{_datadir}/applications %{name}.desktop
  44. LANG_FILES=$(find . -maxdepth 1 -type f -name "*.gmo" | cut -d"/" -f2 | cut -d"." -f1)
  45. langs=`echo $LANG_FILES`
  46. for lang in ${langs[@]};do
  47. %{__mkdir_p} %{buildroot}%{_localedir}/${lang}/LC_MESSAGES
  48. %{__install} -m0644 ${lang}.gmo %{buildroot}%{_localedir}/${lang}/LC_MESSAGES/cdemu.mo
  49. done
  50. %find_lang cdemu
  51. %check
  52. %{_bindir}/desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
  53. %clean
  54. %{__rm} -rf %{buildroot}
  55. %post
  56. if [ -x %{_bindir}/update-desktop-database ] ; then
  57. %{_bindir}/update-desktop-database %{_datadir}/applications
  58. fi
  59. %postun
  60. if [ -x %{_bindir}/update-desktop-database ] ; then
  61. %{_bindir}/update-desktop-database %{_datadir}/applications
  62. fi
  63. %files -f cdemu.lang
  64. %defattr(-,root,root,-)
  65. %doc AUTHORS ChangeLog COPYING NEWS README
  66. %config(noreplace) %{_sysconfdir}/bash_completion.d/cdemu-bash-completion.sh
  67. %{_bindir}/*
  68. %{_datadir}/applications/%{name}.desktop
  69. %{_datadir}/pixmaps/%{name}.svg
  70. %{_mandir}/man1/*
  71. %changelog
  72. * Tue Jan 23 2018 IWAI, Masaharu <iwaim.sub@gmail.com> - 3.1.0-1
  73. - update to 3.1.0
  74. * Sat Feb 25 2017 IWAI, Masaharu <iwaim.sub@gmail.com> - 3.0.3-1
  75. - update to 3.0.3
  76. - update BuildRequires
  77. - add post and postun scripts
  78. * Sat May 05 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.5.0-1
  79. - new upstream release
  80. - changed atchive type gzip to bzip2
  81. - dropt BuildRequires: python-devel
  82. * Sat Dec 24 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.4.0-1
  83. - new upstream release
  84. * Thu Sep 2 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.3.0-1
  85. - new upstream release
  86. * Sat Sep 26 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.2.0-1
  87. - initial build for VineSeed
  88. * Sat Jun 28 2008 Rok Mandeljc <rok.mandeljc@email.si> - 1.1.0-1
  89. - Updated to 1.1.0
  90. * Thu Dec 20 2007 Rok Mandeljc <rok.mandeljc@email.si> - 1.0.0-1
  91. - Initial RPM release.