Sophie

Sophie

distrib > Mandriva > 2007.1 > i586 > by-pkgid > b178828dc252a5436a75551bc53dc436 > files > 10

qcad-2.0.5.0-3mdv2007.1.src.rpm

%define	name	qcad
%define	version	2.0.5.0
%define manver	2.0.4.0-1
%define	release	3

Summary: 	A professional CAD system
Name: 		%{name}
Version: 	%{version}
Release: 	%mkrel %{release}
Source0:	http://www.ribbonsoft.com/archives/qcad/qcad-%{version}-1-community.src.tar.bz2
Source1: 	icons-%{name}.tar.bz2
Source2:	http://www.ribbonsoft.com/archives/qcad/qcad-manual-en-%{manver}.html.zip
Patch0:		qcad-2.0.4.0-1-x86_64.patch
Patch1:		qcad-2.0.4.0-1-assistant.patch
Patch2:		qcad-2.0.5.0-1-path.patch
Patch3:		qcad-2.0.4.0-1-manfix.patch
Patch4:		qcad-2.0.5.0-1-nopedantic.patch
Patch5:		qcad-2.0.5.0-1-release_translations.patch
URL: 		http://www.qcad.org
License: 	GPL 
Group: 		Graphics
BuildRequires: 	XFree86-devel
BuildRequires:	jpeg-devel
BuildRequires:  png-devel
BuildRequires:  zlib-devel
BuildRequires:	qt3-devel
BuildRequires:	qt3-static-devel
BuildPreReq:	unzip
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}-1-community.src
%setup -q -T -D -a 2 -n %{name}-%{version}-1-community.src
%patch0 -p1 -b .x86_64
%patch1 -p1 -b .assistant
%patch2 -p1 -b .path
%patch3 -p1 -b .manfix
%patch4 -p1 -b .nopedantic
%patch5 -p1 -b .rtsh
perl -pi -e 's!\@BINDIR\@!%_bindir!;s!\@DATADIR\@!%_datadir!' qcad/src/qc_applicationwindow.cpp
chmod +x scripts/release_translations.sh

%build
# QTDIR is always set to /usr/lib/qt3
export QTDIR=%{_prefix}/lib/qt3
export PATH=$PATH:$QTDIR/bin
%ifarch x86_64
export QMAKESPEC=$QTDIR/mkspecs/linux-g++-64
%else
export QMAKESPEC=$QTDIR/mkspecs/linux-g++
%endif

pushd scripts
CFLAGS="%{optflags}" \
CXXFLAGS="%{optflags}" \
./build_qcad.sh
popd

%install
rm -rf $RPM_BUILD_ROOT
install -m 755 -d $RPM_BUILD_ROOT%_bindir \
	$RPM_BUILD_ROOT%_libdir/qcad \
	$RPM_BUILD_ROOT%_iconsdir \
        $RPM_BUILD_ROOT%_datadir/%name \
	$RPM_BUILD_ROOT%_datadir/qcad/doc \
	$RPM_BUILD_ROOT%_datadir/qcad/library

pushd $RPM_BUILD_DIR/%{name}-%{version}-1-community.src/qcad
	cp -p qcad $RPM_BUILD_ROOT/%_bindir/
	for i in {data,fonts,library,machines,patterns,qm}; do
		cp -r $i $RPM_BUILD_ROOT/%_datadir/%name
	done
popd
cp -rfp qcad-manual-en-%{manver}.html/* $RPM_BUILD_ROOT/%_datadir/qcad/doc

# 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="Office/Graphs"\
title="Qcad"\
command="%{_bindir}/qcad"\
icon=%{name}.png \
%if %{mdkversion} >= 200610
xdg=true \
%endif
longtitle="A professional CAD system"
EOF

# desktop
install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/applications
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}.desktop <<EOF
[Desktop Entry]
Name=Qcad
Comment=A professional CAD system
Exec=%{_bindir}/qcad %f
Icon=qcad
Terminal=false
Type=Application
Categories=X-MandrivaLinux-Office-Graphs;Office;Chart;
StartupNotify=true
Encoding=UTF-8
EOF

# fix permissions
find $RPM_BUILD_ROOT%_bindir/ -type d -print0 | xargs -0 chmod 755
find $RPM_BUILD_ROOT%_libdir/ -type d -print0 | xargs -0 chmod 755
find $RPM_BUILD_ROOT%_datadir/ -type d -print0 | xargs -0 chmod 755
find $RPM_BUILD_ROOT%_menudir/ -type f  -print0 | xargs -0 chmod 644
find $RPM_BUILD_ROOT%_datadir/ -type f  -print0 | xargs -0 chmod 644

# remove not packaged files
rm $RPM_BUILD_ROOT%_includedir -rf

%post
%{update_menus}

%postun
%{clean_menus}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc qcad/README 
%attr(755,root,root) %{_bindir}/qcad
%{_iconsdir}/*.png
%{_liconsdir}/*.png
%{_miconsdir}/*.png
%{_menudir}/qcad
%{_datadir}/qcad/*
%{_datadir}/applications/*.desktop


%changelog
* Thu Mar 15 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.0.5.0-3mdv2007.1
+ Revision: 144419
- Added fix for bug 26993.
- Unbzip2 patches.

* Mon Feb 19 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.0.5.0-2mdv2007.1
+ Revision: 122914
- Import qcad



* Sat Feb 17 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.0.5.0-2mdv2007.1
- xdg menu.

* Fri May 06 2006 Giuseppe Ghibò <ghibo@mandriva.com> 2.0.5.0-1mdk
- qcad-2.0.5.0-1-nopedantic.patch.bz2.
- Provide CFLAGS|CXXFLAGS to build_cad.sh.
- Added Patch5 for providing .qm files.

* Fri May 06 2006 Giuseppe Ghibò <ghibo@mandriva.com> 2.0.4.0-4mdk
- Removed MDK920 conditional flags.
- Merged Patch1 from FC5 (fix call of QT assistant).
- Added Patch2 to fix doc and assistant path.
- Merged Patch3 from FC5 (fix manual).
- Added HTML Manual.
- Added Patch4 to allow 'long long' type.

* Mon May 06 2006 Giuseppe Ghibò <ghibo@mandriva.coM> 2.0.4.0-3mdk
- Added fix for x86-64 (Patch2).
- Cleaned SPEC file of unused things.

* Sat Jul 09 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.0.4.0-2mdk
- Rebuilt.

* Wed Oct 27 2004 Laurent MONTEL <lmontel@mandrakesoft.com> 2.0.4.0-1mdk
- 2.0.4.0

* Sun Jul 18 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.0.3.3-1mdk
- build with gcc 3.4 (patch1)
- 2.0.3.3

* Fri May 07 2004 Laurent MONTEL <lmontel@mandrakesoft.com> 2.0.3.1-1mdk
- 2.0.3.1

* Thu Apr 15 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.0.1.3-6mdk
- really use mdkversion, other fixlets

* Wed Mar 31 2004 Laurent MONTEL <lmontel@mandrakesoft.com> 2.0.1.3-5mdk
- Use mdkversion

* Wed Feb 18 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.0.1.3-4mdk
- from David Abilleira <david@abilleira.com> :
	- Fix install section to include the needed fonts,patterns,qm and scripts
	- Qcad will search most of them first in /usr/share/qcad 
	-    (qcadlib/src/engine/rs_system.cpp:262)
	- Install doc and examples too
	- Do not package development files
	- Patch to qcad to load language files from any of the search dirs

* Thu Feb 12 2004 David Baudens <baudens@mandrakesoft.com> 2.0.1.3-3mdk
- Fix menu

* Tue Dec 16 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.0.1.3-1mdk
- 2.0.1.3

* Wed Nov 19 2003 Laurent MONTEL <lmontel@mandrakesoft.com> 2.0.1.1-1-1mdk
- 2.0.1

* Tue Oct 21 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.5.4-5mdk
- fix deps

* 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.