From c68ca17202837a855b32fad485e25b3f3915f643 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 16:59:51 +0100 Subject: [PATCH] remove use of update-desktop-database sort specfile heaeder entries in the usual way for openmamba list one build requirement per line remove version from deskt menu entry and other fixes [release 2.0.5.0-2mamba;Fri Mar 07 2008] --- README.md | 3 + qcad-nopedantic.patch | 12 +++ qcad.spec | 187 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 202 insertions(+) create mode 100644 qcad-nopedantic.patch create mode 100644 qcad.spec diff --git a/README.md b/README.md index 7d5bd5b..10d96f5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # qcad +QCad is a professional 2D 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. + diff --git a/qcad-nopedantic.patch b/qcad-nopedantic.patch new file mode 100644 index 0000000..51e7512 --- /dev/null +++ b/qcad-nopedantic.patch @@ -0,0 +1,12 @@ +diff -Naur qcad-2.0.5-orig/mkspecs/defs.pro qcad-2.0.5.0-1-community.src/mkspecs/defs.pro +--- qcad-2.0.5-orig/mkspecs/defs.pro 2008-01-19 14:59:44.000000000 +0100 ++++ qcad-2.0.5.0-1-community.src/mkspecs/defs.pro 2008-01-19 15:15:37.000000000 +0100 +@@ -1,6 +1,6 @@ + # $Id: defs.pro 606 2004-12-25 03:08:40Z andrew $ +-QMAKE_CXXFLAGS_DEBUG += -pedantic +-QMAKE_CXXFLAGS += -pedantic ++QMAKE_CXXFLAGS_DEBUG += -Wno-long-long -pedantic ++QMAKE_CXXFLAGS += -Wno-long-long -pedantic + + win32 { + QMAKE_CFLAGS_THREAD -= -mthreads diff --git a/qcad.spec b/qcad.spec new file mode 100644 index 0000000..dbaa80f --- /dev/null +++ b/qcad.spec @@ -0,0 +1,187 @@ +%define _csver 2.0.4.0-1 +%define _dever 2.1.0.0-1 +%define _enver 2.1.0.0-1 +%define _huver 2.0.4.0-1 + +Name: qcad +Version: 2.0.5.0 +Release: 2mamba +Summary: A professional 2D CAD system +Group: Applications/Graphics +Vendor: openmamba +Distribution: openmamba +Packager: Tiziana Ferro +URL: http://www.qcad.org +Source0: ftp://ribbonsoft.com/archives/qcad/%{name}-%{version}-1-community.src.tar.gz +Source1: ftp://ribbonsoft.com/archives/qcad/%{name}-manual-cs-%{_csver}.html.zip +Source2: ftp://ribbonsoft.com/archives/qcad/%{name}-manual-de-%{_dever}.html.zip +Source3: ftp://ribbonsoft.com/archives/qcad/%{name}-manual-en-%{_enver}.html.zip +Source4: ftp://ribbonsoft.com/archives/qcad/%{name}-manual-hu-%{_huver}.html.zip +Patch0: qcad-nopedantic.patch +License: GPL +BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: bash +BuildRequires: patch +BuildRequires: libqt-devel +BuildRequires: libmng-devel +BuildRequires: libpng-devel +BuildRequires: libGLU-devel +BuildRequires: libGL-devel +BuildRequires: libXmu-devel +BuildRequires: libSM-devel +BuildRequires: libICE-devel +BuildRequires: libIDL-devel +BuildRequires: libpthread-stubs-devel +BuildRequires: libXext-devel +BuildRequires: libX11-devel +BuildRequires: glibc-devel + +%description +QCad is a professional 2D 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 -a1 -a2 -a3 -a4 +%patch0 -p1 + +%build +# QTDIR is always set to /usr/lib/qt3 +export QTDIR=/usr/lib/qt3 +export QMAKESPEC=$QTDIR/mkspecs/linux-g++ +export PATH=$PATH:$QTDIR/bin + +%define pkgdatadir %{_datadir}/qcad + +[ -n "$QTDIR" ] || . %{_sysconfdir}/profile.d/qt.sh +( + cd scripts + ./build_qcad.sh notrans + # ./build_qcad.sh prof notrans +) + +#find -name '*.ts' -exec lrelease '{}' ';' +find -name '*.qm' -exec cp '{}' qcad/qm ';' +#cd .. +cwd=`pwd` +for dir in qcad qcadactions qcadguiqt qcadcmd qcadlib +do + pushd $dir/src + echo "running lrelease in $dir/src..." + find -type f -name '*.ts' -exec $QTDIR/bin/lrelease '{}' \; + find -type f -name '*.pro' -exec $QTDIR/bin/lrelease '{}' \; + popd + + pushd $dir/src/ts + echo "copying from $dir/src/ts..." + for tf in *.qm + do + if [ ! -e $cwd/qcad/qm/$tf ] + then + cp $cwd/$dir/src/ts/$tf $cwd/qcad/qm/$tf + fi + done + popd +done +echo "building translations finished" + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +mkdir -p %{buildroot}%{pkgdatadir} \ + %{buildroot}%{pkgdatadir}/icon \ + %{buildroot}%{pkgdatadir}/doc + +cp -LR scripts %{buildroot}%{_datadir}/qcad +cp -fr %{name}-manual-cs-%{_csver}.html/* %{buildroot}%{pkgdatadir}/doc +cp -fr %{name}-manual-de-%{_dever}.html/* %{buildroot}%{pkgdatadir}/doc +cp -fr %{name}-manual-en-%{_enver}.html/* %{buildroot}%{pkgdatadir}/doc +cp -fr %{name}-manual-hu-%{_huver}.html/* %{buildroot}%{pkgdatadir}/doc + +cd qcad + +mkdir -p %{buildroot}%{_datadir}/applications + +#cat > %{buildroot}%{_bindir}/qcad < %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF +[Desktop Entry] +Name=QCad +Comment=A professional 2D CAD system +Comment[it]=Un sistema professionale di CAD 2D +GenericName=A professional 2D CAD system +GenericName[it]=Un sistema professionale di CAD 2D +Exec=qcad +Icon=/usr/share/qcad/icon/qcad.png +Terminal=0 +Type=Application +Categories=KDE;Application;Graphics; +X-KDE-StartupNotify=false +EOF + +# fix permissions +find %{buildroot}%{_bindir}/ -type d -print | xargs chmod 755 +find %{buildroot}%{_libdir}/ -type d -print | xargs chmod 755 +find %{buildroot}%{_datadir}/ -type d -print | xargs chmod 755 +find %{buildroot}%{_datadir}/ -type f -print | xargs chmod 644 + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%doc qcad/doc qcad/README qcad/data +%defattr(755,root,root) +%{_datadir}/qcad/* +%{_bindir}/* +%{_datadir}/applications/* +%{_datadir}/pixmaps/* +%changelog +* Fri Mar 07 2008 Silvan Calarco 2.0.5.0-2mamba +- remove use of update-desktop-database +- sort specfile heaeder entries in the usual way for openmamba +- list one build requirement per line +- remove version from deskt menu entry and other fixes + +* Sat Dec 08 2007 Tiziana Ferro 2.0.5.0-1mamba +- update to 2.0.5.0 + +* Mon Apr 18 2005 Alessandro Ramazzina 2.0.4.0-3qilnx +- rebuild and added a changelog entry + +* Fri Apr 08 2005 Alessandro Ramazzina 2.0.4.0-2qilnx +- rebuild and moved from devel-contrib repository to devel repository + +* Sat Sep 25 2004 Matteo Bernasconi 2.0.4-1qilnx +- first build