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