Initial stab at an RPM spec file.
[perl-indexdata-utils.git] / libindexdata-utils-perl.spec
diff --git a/libindexdata-utils-perl.spec b/libindexdata-utils-perl.spec
new file mode 100644 (file)
index 0000000..5c4e3da
--- /dev/null
@@ -0,0 +1,56 @@
+%define idmetaversion %(. ./IDMETA; echo $VERSION|tr -d '\n')
+Summary: Utility Perl extension for Index Data applications
+Name: libindexdata-utils-perl
+Version: %{idmetaversion}
+Release: 1.indexdata
+License: IndexData
+Group: Development/Libraries
+Vendor: Index Data ApS <info@indexdata.com>
+Source: libindexdata-utils-perl-%{version}.tar.gz
+BuildArch: noarch
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: perl
+Packager: Mike Taylor <mike@indexdata.com>
+URL: http://www.indexdata.com/
+
+Requires: perl-IO-File
+
+%description
+This library contains utility functions that we at Index Data want to
+share between multiple applications -- for example, the persistent
+counter used by both IRSpy and MKHome.
+
+%prep
+%setup
+
+%build
+%{__perl} Makefile.PL PREFIX=/usr INSTALLDIRS=vendor
+%{__make}
+
+%install
+%{__rm} -rf %{buildroot}
+%{__make} pure_install DESTDIR=%{buildroot}
+#find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
+#find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
+#find %{buildroot} -type f -name CPU.bs -exec rm -f {} ';'
+# Perl's make install seems to create both uncompressed AND compressed
+# versions of the manual pages, which confuses /usr/lib/rpm/brp-compress
+#find $RPM_BUILD_ROOT/usr/share/man -name '*.gz' -exec rm -f '{}' \;
+
+# Install documentation
+DOCDIR=$RPM_BUILD_ROOT%{_datadir}/doc/libindexdata-utils-perl
+mkdir -p $DOCDIR
+cp -p README $DOCDIR/
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files
+%defattr(-,root,root)
+%doc %{_datadir}/doc/libindexdata-utils-perl
+#%doc %{_datadir}/man/man3/Masterkey::Admin::*.3pm.gz
+%{perl_vendorlib}
+
+%changelog
+* Tue Dec  9 2014 Mike Taylor <mike@indexdata.com>
+- First Red Hat packaged version.