On Mon, 2001-08-27 at 02:15, Gabriel Gerhardsson wrote:
> Hi
> 
> Ok, I've done some experimentations here tonight. 
> I shamefully took one of Martins spec-files and modified it. Without
> those spec-files it would really have taken lots more time before I had
> gotten all these things with prefixes and all sorts of other stuff
> right. Thanks Martin!
> 
> I made a spec-file that builds a rpm for the swedish dictionary. (The
> ideas about scripting, to build all rpms from one spec-file will be a
> later problem. I'm concentrating to get the basics to work first.)
> I would appreciate it if someone familiar with spec-files can take a
> look at this and tell me all the things that are wrong (I'm sure there's
> lots =). 
> For example, I tar the dictionary and distribute it that way in the rpm.
> Only when the rpm is installed, I untar it. Is this the right way of
> doing it? or is rpms compressed automaticly?
> And I wouldn't mind if anyone would suggest some better wordings in the
> %description and such. I did just put something there.
> 
> Btw, I put up a test rpm here:
> www.cs.umu.se/~dva99ggn/abiword-dictionary-se-0.0.1-1.noarch.rpm
> 
> Take care
> /Gabriel

Ok, I'm learning.
I woke up 30 minutes ago and the first thought that hit my mind was:
"No! I did it all wrong last night!". I instantaneously had a couple of
things clear to me, that I had done wrong last night.

(for example, duuh, the %install-stage is performed (as the others) when
the rpm is built. I had my mental image of that a bit wrong last night.
Anyway, so that makes my question about whether it is the right thing to
do, to keep the files tared until %install is run, totally meaningless.)

I've now fixed those things.

And a new version of the test rpm is here:
www.cs.umu.se/~dva99ggn/abiword-dictionary-se-0.0.1-2.noarch.rpm

Take care
/Gabriel
%define name abiword-dictionary-se
%define version 0.0.1
%define release 2
%define prefix /usr
%define ABIPREFIX %{prefix}/share

Name: %{name}
Summary: Swedish(se) Dictionary.
Version: %{version}
Release: %{release}
Source: %{name}-%{version}.tar.gz
Group: Applications/Publishing
URL: http://www.abisource.com/
BuildRoot: /var/tmp/%{name}-%{version}-buildroot
Copyright: GPL
Prefix: %{prefix}
#Icon: 
Packager: Gabriel Gerhardsson <[EMAIL PROTECTED]>
Distribution: RedHat 7.x Contrib
# No requirements
#Requires: 


%description
Swedish(se) dictionary for use with Abiword.
AbiWord is a Multiplattform Wordprocesser which for the Unix plattform comes with a 
GTK+ interface. For extended functionality and intergration it is also possible to 
compile AbiWord with GNOME support. Abiword with the GNOME frontend is part of the 
GNOME Office Suite. AbiWord is made available under the GNU GPL license.


%prep
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
mkdir $RPM_BUILD_DIR/%{name}-%{version}
cd %{name}-%{version}
tar zxvf $RPM_SOURCE_DIR/abiword-dictionary-se-%{version}.tar.gz


%build
#Nothing needs to be done


%install
# Copies all ispell dictionaries
mkdir -p $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/dictionary
cp $RPM_BUILD_DIR/%{name}-%{version}/*.hash 
$RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/dictionary/
# Remove duplicate Little* entry
/bin/rm -f $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/dictionary/Little*


%clean
rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/file.list.%{name} 
$RPM_BUILD_DIR/abiword-dictionary-se


%files
%defattr(-,root,root)
%{ABIPREFIX}/AbiSuite/dictionary/*


%changelog
* Mon Aug 27 2001 Gabriel Gerhardsson
- Cleaned up a bit.
- Stopped my previous tar-silliness.

* Mon Aug 27 2001 Gabriel Gerhardsson
- Initial experimentation

Reply via email to