Sophie

Sophie

distrib > Mandriva > 9.2 > i586 > media > main-src > by-pkgid > 019f35f64b46465ea5a8caf9029feed5 > files > 4

qcad-1.5.4-4mdk.src.rpm

%{expand:%%define buildfor8_2 %(A=$(awk '{print $4}' /etc/mandrake-release); if [ "$A" = 8.2 ]; then echo 1; else echo 0; fi)}
%{expand:%%define buildfor9_0 %(A=$(awk '{print $4}' /etc/mandrake-release); if [ "$A" = 9.0 ]; then echo 1; else echo 0; fi)}
%{expand:%%define buildfor9_1 %(A=$(awk '{print $4}' /etc/mandrake-release); if [ "$A" = 9.1 ]; then echo 1; else echo 0; fi)}
%{expand:%%define buildfor9_2 %(A=$(awk '{print $4}' /etc/mandrake-release); if [ "$A" = 9.2 ]; then echo 1; else echo 0; fi)}

%define	name	qcad
%define	version	1.5.4
%define	release	4mdk

Summary: 	A professional CAD system
Name: 		%{name}
Version: 	%{version}
Release: 	%{release}
Source0:	http://belnet.dl.sourceforge.net/sourceforge/qcad/%{name}-%{version}-src.tar.bz2
Source1: 	icons-%{name}.tar.bz2
Patch0:		%{name}-%{version}-qt3.patch.bz2
URL: 		http://www.qcad.org
License: 	GPL 
Group: 		Graphics
%if !%buildfor9_2
BuildRequires: 	XFree86-devel
BuildRequires:	libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  zlib-devel
BuildRequires:	libqt3-devel
BuildRequires:	tmake
%else
BuildRequires: 	XFree86-devel
BuildRequires:	jpeg-devel
BuildRequires:  png-devel
BuildRequires:  zlib-devel
BuildRequires:	qt3-devel
BuildRequires:	tmake
%endif

BuildRoot: 	%{_tmppath}/%{name}-%{version}-root

%description
QCad is a professional CAD System. With QCad you can easily construct and
change drawings with ISO-text and many other features and save them as
DXF-files. These DXF-files are the interface to many CAD-systems such
as AutoCAD(TM) and many others.

%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .qt3

%build
export PATH=$PATH:%_libdir/qt3/bin
%make CFLAGS="%optflags" CXXFLAGS="%optflags" QTDIR=%_libdir/qt3

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%_bindir \
	$RPM_BUILD_ROOT%_libdir/qcad \
	$RPM_BUILD_ROOT%_iconsdir

install -s -m 755 qcad $RPM_BUILD_ROOT/%_libdir/qcad

# icons
tar xjf %SOURCE1 -C $RPM_BUILD_ROOT%{_iconsdir}

# menu
install -m 755 -d $RPM_BUILD_ROOT/%_menudir
cat > $RPM_BUILD_ROOT%_menudir/qcad <<EOF
?package(qcad):\
needs="x11"\
section="Applications/Publishing"\
title="Qcad"\
longtitle="A professional CAD system"\
command="%{_bindir}/qcad"\
icon=qcad.png
EOF

cp -pR {doc,examples,fonts,hatches,libraries,messages} \
	$RPM_BUILD_ROOT%_libdir/qcad

cat > $RPM_BUILD_ROOT%_bindir/qcad <<EOF
#!/bin/sh
cd %_libdir/qcad
./qcad "\$@"
EOF

# fix permissions
find $RPM_BUILD_ROOT%_libdir/qcad -type d -print | xargs chmod 755
find $RPM_BUILD_ROOT%_libdir/qcad/libraries -type f -name '*.dxf' -print | xargs chmod 644

%post
%{update_menus}

%postun
%{clean_menus}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING INSTALL MANIFEST README TODO
%attr(755,root,root) %{_bindir}/qcad
%{_libdir}/qcad
%{_iconsdir}/*.png
%{_liconsdir}/*.png
%{_miconsdir}/*.png
%{_menudir}/qcad

%changelog
* Thu Sep 04 2003 Laurent MONTEL <lmontel@mandrakesoft.com> 1.5.4-4mdk
- Fix build

* Mon Jul 14 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 1.5.4-3mdk
- rebuild

* Fri Feb 07 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.5.4-2mdk
- Rebuilt.

* Sun Nov 10 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.5.4-1mdk
- Version 1.5.4.
- Re-adapted Patch0.

* Sun Aug 18 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.5.1-2mdk
- fixed changelog.

* Sun Aug 18 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.5.1-1mdk
- Version 1.5.1.

* Wed Aug 14 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.4.16-4mdk
- Automated rebuild with gcc 3.2-0.3mdk

* Sat Jul 27 2002 Laurent MONTEL <lmontel@mandrakesoft.com> 1.4.16-3mdk
- Rebuild against gcc-3.2

* Sat Jul 06 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.4.16-2mdk
- png icons.
- fixed mechanical libraries file permissions.

* Sat Jul 06 2002 Laurent MONTEL <lmontel@mandrakesoft.com> 1.4.16-1mdk
- Port to kde3.0.
- Be careful: I ported to qt3 but it's not again very perfect!

* Sat Jan 05 2002 Laurent MONTEL <lmontel@mandrakesoft.com> 1.4.6-7mdk
- Make rpmlint happy

* Sat Oct 20 2001 Laurent MONTEL <lmontel@mandrakesoft.com> 1.4.6-6mdk
- Rebuild against libpng3

* Thu Sep 12 2001 Laurent MONTEL <lmontel@mandrakesoft.com> 1.4.6-5mdk
- Rebuild

* Thu May 02 2001 Laurent MONTEL <lmontel@mandrakesoft.com> 1.4.6-4mdk
- Compile with kde2.2alpha1

* Wed Mar 14 2001 David BAUDENS <baudens@mandrakesoft.com> 1.4.6-3mdk
- Use optimizations

* Wed Mar 14 2001 David BAUDENS <baudens@mandrakesoft.com> 1.4.6-2mdk
- Rebuild against Qt 2.3.0

* Sat Mar 03 2001 Laurent MONTEL <lmontel@mandrakesoft.com> 1.4.6-1mdk
- Update code

* Fri Sep 08 2000 Enzo Maggi <enzo@mandrakesoft.com> 1.4.1-4mdk
- recompiled with the right flags

* Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.4.1-3mdk
- automatically added BuildRequires

* Thu Jul 27 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.4.1-2mdk
- macroszifications
- rebuild for the BM

* Tue Jun 20 2000 Enzo Maggi <enzo@mandrakesoft.com> 1.4.1-1mdk
- packaged version 1.4.1

* Wed May 03 2000 Geoffrey Lee <snailtalk@linux-mandrake.com>
- _prefix && _tmppath

* Wed Apr 26 2000 Enzo Maggi <enzo@mandrakesoft.com> 1.3.3-5mdk
- Adapted to the new location of the qt2 includes 

* Tue Apr 11 2000 Enzo Maggi <enzo@mandrakesoft.com> 1.3.3-4mdk
- Changed group
- New menu entry

* Thu Jan 27 2000 Camille Bégnis <camille@mandrakesoft.com> 1.3.3-2mdk
- fixed typo in qcad.kdelink

* Tue Dec 30 1999 Giuseppe Ghibò <ghibo@linux-mandrake.com>
- Updated to version 1.3.3.

* Mon Nov  8 1999 Giuseppe Ghibò <ghibo@linux-mandrake.com>
- First spec file for Mandrake distribution.