%define dist %(sh /usr/lib/rpm/redhat/dist.sh) Name: docker-volume-sheepdog Version: 0.1.2_3_g64c14ab Release: 1%{?dist} Summary: Docker Volume Plugin for Sheepdog License: MIT URL: https://github.com/kazuhisya/docker-volume-sheepdog Source0: docker-volume-sheepdog Source1: docker-volume-sheepdog.service Source2: README.md Source3: LICENSE Source4: sheepdog.json Source5: sheepdog-sample.json BuildRequires: systemd-units Requires: sudo Requires: scsi-target-utils Requires: iscsi-initiator-utils Requires: sheepdog Requires: /bin/lsblk Requires: /sbin/mkfs.xfs %description Docker Volume plugin to create persistent volumes in a sheepdog cluster. %prep %build %install %{__rm} -rf %{buildroot} %{__install} -d %{buildroot}%{_sbindir} %{__install} -d %{buildroot}%{_unitdir} %{__install} -d %{buildroot}%{_sysconfdir}/docker-volume-plugin.d %{__install} -d %{buildroot}%{_defaultdocdir}/%{name}-%{version} %{__install} -p -m 0755 %{SOURCE0} %{buildroot}%{_sbindir}/%{name} %{__install} -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/ %{__install} -p -m 0644 %{SOURCE2} %{buildroot}%{_defaultdocdir}/%{name}-%{version}/ %{__install} -p -m 0644 %{SOURCE3} %{buildroot}%{_defaultdocdir}/%{name}-%{version}/ %{__install} -p -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/docker-volume-plugin.d/ %{__install} -p -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/docker-volume-plugin.d/ %files %defattr(-,root,root,-) %{_sbindir}/%{name} %{_unitdir}/%{name}.service %config(noreplace) %{_sysconfdir}/docker-volume-plugin.d/sheepdog.json %{_sysconfdir}/docker-volume-plugin.d/sheepdog-sample.json %{_defaultdocdir}/%{name}-%{version} %changelog * Wed Oct 25 2017 Kazuhisa Hara - docker-volume-sheepdog: 0.1.2_3_g64c14ab