diff options
author | Henning Makholm <henning@makholm.net> | 2009-07-01 18:00:00 (EDT) |
---|---|---|
committer | Julien Jorge <julien.jorge@stuff-o-matic.com> | 2013-01-10 16:10:03 (EST) |
commit | 70a9b1ca8750a43e8092807d174a8c49407aa213 (patch) | |
tree | 78e1cbff8e9750d918c4bc8782086fc37306492a /xcftools.spec | |
parent | c60d2efdeaa61c5e8a930f9635548f5abaf201b3 (diff) | |
download | xcftools-70a9b1ca8750a43e8092807d174a8c49407aa213.zip xcftools-70a9b1ca8750a43e8092807d174a8c49407aa213.tar.gz xcftools-70a9b1ca8750a43e8092807d174a8c49407aa213.tar.bz2 |
Import of release 1.0.5
Diffstat (limited to 'xcftools.spec')
-rw-r--r-- | xcftools.spec | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/xcftools.spec b/xcftools.spec new file mode 100644 index 0000000..f6e381c --- /dev/null +++ b/xcftools.spec @@ -0,0 +1,96 @@ +# This script was contributed by Marcus Alanen. +# +# Henning Makholm, the xcftools author, have not had occasion to test +# it, so use at your own peril. In particular, note that there is a +# hard-coded version number just a few lines in. I make no promises +# that I'll remember to update it for versions 1.0.5 - caveat emptor! + +############################################################################# +# Variables +############################################################################# +%define name xcftools +%define version 1.0.5 +%define release 1 + +############################################################################# +# Preamble. This contains general information about the package. +############################################################################# +Summary : xcftools +Name : %{name} +Version : %{version} +Release : %{release} +License : See LICENSE file. +Group : Development/Tools +Source : xcftools-%version.tar.gz +Packager : Marcus Alanen <marcus.alanen@gmail.com> + +BuildRoot : %{_tmppath}/%{name}-buildroot +Prefix : /usr +Requires : glibc + +############################################################################# +# A description of the project +############################################################################# +%description +xcftools is a set of tools for extracting information from GIMP's xcf +files. + +############################################################################# +# Preparations for the install. We don't need to do anything special here, +# so we let the %setup-macro take care of creating a directory and unpacking +# the sources. +############################################################################# +%prep +rm -rf $RPM_BUILD_ROOT +%setup +%patch0 -p1 + +############################################################################# +# Build the project +############################################################################# +%build +./configure --prefix=/usr && make DESTDIR=$RPM_BUILD_ROOT + +############################################################################# +# Install the software +############################################################################# +%install +mkdir $RPM_BUILD_ROOT/usr || true +mkdir $RPM_BUILD_ROOT/usr/share || true +mkdir $RPM_BUILD_ROOT/usr/share/man || true +mkdir $RPM_BUILD_ROOT/usr/share/man/man1/ || true + +make install DESTDIR=$RPM_BUILD_ROOT + +cd $RPM_BUILD_ROOT + +function getfiles() { + # Change /usr/bin to ./usr/bin + dir=$(echo $1 | sed -e 's|.|\.\/|;') + find $dir -type d -print | sed 's,^\.,\%attr(-\,root\,root) \%dir ,' + + find $dir -type f -print | sed -e 's,^\.,\%attr(-\,root\,root) ,' \ + -e '/\/etc\//s|^|%config|' \ + -e '/\/config\//s|^|%config|' + + find $dir -type l -print | sed 's,^\.,\%attr(-\,root\,root) ,' +} + +all=$RPM_BUILD_DIR/filelist.%{name} + +getfiles %{prefix} | grep -v /man/ > $all + +############################################################################# +# Files to be included in the package. +############################################################################# +%files -f ../filelist.%{name} +%defattr(-,root,root,0755) +%{_mandir}/*/* + +############################################################################# +# Cleaning up stuff. +############################################################################# +%clean +make clean +rm -rf $RPM_BUILD_ROOT + |