qucs package : first try and need help

Michael A. Peters mpeters at mac.com
Tue Oct 11 21:27:26 UTC 2005


On Tue, 2005-10-11 at 22:25 +0200, Eric TANGUY wrote:
> So i tried to package qucs and i had some problems :
> * i need to pass a parameter to configure : QTDIR=/usr/lib/qt-3.3 but i
> think this not a good way to do that ...
> * i tried also to add a desktop file but the system complain about the
> desktop file is not packaged.
> You can look to this package
> http://perso.wanadoo.fr/eric.tanguy/qucs-0.0.7-5.fc4.src.rpm
> Thanks

I've attached a spec file.
I don't do qt stuff - so there may be a better way to have configure
find the qt libs.

-=-
Notes -

The BuildRequires need to be above the description.
Use %{?dist} instead of manually specifying the dist.

on make - use
make %{?_smp_mflags}

For the desktop file - before using desktop-file-install, create the
directory it will be installed into.

in %files - use
%defattr(-,root,root-) instead of %defattr(-,root,root)

Traditionally, %doc comes before any other files

For the stuff in /usr/share/%{name} just use

%{_datadir}/%{name}

rpm will automatically include everything inside that directory.

For man - just use

%{_mandir}/man1/*

Don't specify .gz - some builds of rpm will use .bz2 - so use a
wildcard.
-------------- next part --------------
%define qtversion 3.3
# may be a way of detecting above

#

Summary:	Circuit simulator
Name: 		qucs
Version:	0.0.7
Release: 	5%{?dist}
Source0:	%{name}-%{version}.tar.gz
Source1:	%{name}.desktop
URL:		http://qucs.sourceforge.net/
License:	GPL 
Group: 		Applications/Engineering
BuildRoot:    	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils
BuildRequires: qt-devel



%description
Qucs is a circuit simulator with graphical user interface.  The
software aims to support all kinds of circuit simulation types,
e.g. DC, AC, S-parameter and harmonic balance analysis.

%prep
%setup 

%build
%configure QTDIR=%_libdir/qt-%{qtversion}
make %{?_smp_mflags}

# install will be a bit complicated because we are not assured
# that the builder has root privileges
%install
make install DESTDIR=$RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora                            \
        --dir ${RPM_BUILD_ROOT}%{_datadir}/applications         \
        --add-category X-Fedora                                 \
        %{SOURCE1}

%clean
rm -rf $RPM_BUILD_ROOT


%files 
%defattr(-,root,root-)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_bindir}/qucs*
%{_datadir}/%{name}
%{_datadir}/applications/*
%{_mandir}/man1/*

%changelog
* Tue Oct 11 2005 Eric Tanguy <eric.tanguy at univ-nantes.fr> - 0.0.7-5.fc4
-add qucs.desktop
-modify buildroot

* Tue Aug 2 2005 Wojciech Kazubski <wk at ire.pw.edu.pl>
- version 0.0.7.

* Thu Jun 23 2005 Wojciech Kazubski <wk at ire.pw.edu.pl>
- rebuilt for Fedora Core 4

* Mon May 30 2005 Wojciech Kazubski <wk at ire.pw.edu.pl>
- version 0.0.6.

* Thu Mar 3 2005 Wojciech Kazubski <wk at ire.pw.edu.pl>
- version 0.0.5.

* Fri Dec 10 2004 Wojciech Kazubski <wk at ire.pw.edu.pl>
- version 0.0.4 for Fedora Core 3

# end of file


More information about the fedora-extras-list mailing list