: 14 2018 | : 18665 | : 12542319
en ru br

: qcad

             Sources      Gear   Bugs and FR  Repocop 

%def_with debug

Name: qcad
Release: alt1
Summary: A professional CAD system
Summary(ru_RU.UTF-8): Профессиональная система CAD

# VCS:
License: GPLv3 with exceptions
Group:   Graphics

Packager: Andrey Cherepanov <cas at>

Source0: qcad-%version.tar
Source1: qcad.desktop
Source2: qcad
Patch:   %name-%version-%release.patch

BuildRequires: gcc-c++ qt5-base-devel python
BuildRequires: desktop-file-utils
BuildRequires: libdbus-devel
BuildRequires: libGL-devel
BuildRequires: libGLU-devel
BuildRequires: libssl-devel
BuildRequires: qt5-designer
BuildRequires: qt5-imageformats
BuildRequires: qt5-script-devel
BuildRequires: qt5-svg-devel
BuildRequires: qt5-tools-devel
BuildRequires: qt5-tools-devel-static
BuildRequires: qt5-webengine-devel
BuildRequires: qt5-webkit-devel
BuildRequires: qt5-xmlpatterns-devel
BuildRequires: zlib-devel

Requires: qt5-translations qt5-imageformats

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.

%description -l ru_RU.UTF-8
QCad это профессиональная CAD система. С QCad вы можете легко создавать
и изменять рисунки с вставленным текстом и сохранять это в DXF файлы.
Через DXF файлы есть возможность обмениваться данными с другими CAD
системами (например, AutoCAD).

%setup -q
%patch -p1
%if_with debug
echo 'DEFINES -= QT_NO_DEBUG_OUTPUT' >> shared.pri

if [ ! -e src/3rdparty/qt-labs-qtscriptgenerator-%_qt5_version ] ; then
   pushd src/3rdparty
   cp -ar qt-labs-qtscriptgenerator-5.7.0 qt-labs-qtscriptgenerator-%_qt5_version
   mv qt-labs-qtscriptgenerator-%_qt5_version/ qt-labs-qtscriptgenerator-%_qt5_version/

#export NPROCS=1

# Main executable
install -Dm755 release/qcad-bin %buildroot%_libdir/%name/qcad-bin

# Make executable wrapper

install -Dm0755 %SOURCE2 %buildroot%_bindir/qcad

# Libraries

install -d %buildroot%_libdir
cp release/lib*.so %buildroot%_libdir

# Translations

install -d %buildroot%_libdir/%name/ts
cp ts/*.qm %buildroot%_libdir/%name/ts

# Documentation

install -Dm644 readme.txt %buildroot%_libdir/%name/readme.txt

echo other stuff
# Other stuff
cp -a   examples \
fonts \
libraries \
linetypes \
patterns \
plugins \
scripts \

# Desktop file

install -Dm644 %SOURCE1 %buildroot%_desktopdir/%name.desktop

# Icon

install -Dm644 ./support/doc/api/qcad_icon.png %buildroot%_iconsdir/hicolor/64x64/apps/%name.png

# Add localization fo qcad.lang

for l in $(find %buildroot%_libdir/%name/qm -name \*.qm); do
echo -n $l | sed 's,.*_\(.*\)\.qm,%%lang\(\1\) ,' >> %name.lang
echo $l | sed "s,%buildroot,," >> %name.lang

%doc gpl-3.0-exceptions.txt gpl-3.0.txt LICENSE.txt
%dir %_libdir/%name



: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
: Michael Shigorin