mirror of
https://abf.rosa.ru/djam/kicad.git
synced 2025-02-23 18:22:49 +00:00
362 lines
9.1 KiB
RPMSpec
362 lines
9.1 KiB
RPMSpec
%define revision 5528
|
|
|
|
Summary: EDA software suite for creation of schematic diagrams and PCBs
|
|
Name: kicad
|
|
Version: 2015.03.21
|
|
Release: 0.rev%{revision}.3
|
|
Epoch: 1
|
|
License: GPLv2+
|
|
Group: Sciences/Computer science
|
|
Url: http://www.kicad-pcb.org
|
|
# URL2: https://launchpad.net/kicad
|
|
# URL3: http://orson.net.pl/pub/kicad/
|
|
# Additional librairies from Walter Lain
|
|
# URL4: http://smisioto.no-ip.org/elettronica/kicad/kicad-en.htm
|
|
|
|
# Source files created with the following scripts ...
|
|
# kicad-clone.sh ... clone BZR repositories of main, libraries, doc
|
|
# kicad-update.sh ... update BZR repositories
|
|
# kicad-export.sh ... export BZR repositories and create tarballs
|
|
# kicad-walter-libs.sh ... download, unpack and prepare tarball with walter libs
|
|
|
|
Source0: %{name}-%{version}.tar.xz
|
|
Source1: %{name}-doc-%{version}.tar.xz
|
|
Source2: %{name}-libraries-%{version}.tar.xz
|
|
Source3: %{name}-footprints-%{version}.tar.xz
|
|
Source7: Epcos-MKT-1.0.tar.bz2
|
|
Source8: %{name}-walter-libraries-%{version}.tar.xz
|
|
Patch0: kicad-2015.03.21-boost-1.61.patch
|
|
Patch1: kicad-2015.01.02-nostrip.patch
|
|
Patch2: kicad-2015.01.02-freerouting.patch
|
|
|
|
BuildRequires: cmake
|
|
BuildRequires: desktop-file-utils
|
|
BuildRequires: doxygen
|
|
BuildRequires: boost-devel
|
|
BuildRequires: wxgtku3.0-devel
|
|
BuildRequires: pkgconfig(glew)
|
|
BuildRequires: pkgconfig(openssl)
|
|
|
|
Requires: electronics-menu
|
|
Requires: freerouting
|
|
|
|
%rename kicad-library
|
|
%rename kicad-locales-ca
|
|
%rename kicad-locales-cs
|
|
%rename kicad-locales-de
|
|
%rename kicad-locales-es
|
|
%rename kicad-locales-fi
|
|
%rename kicad-locales-fr
|
|
%rename kicad-locales-hu
|
|
%rename kicad-locales-it
|
|
%rename kicad-locales-ja
|
|
%rename kicad-locales-ko
|
|
%rename kicad-locales-nl
|
|
%rename kicad-locales-pl
|
|
%rename kicad-locales-pt
|
|
%rename kicad-locales-ru
|
|
%rename kicad-locales-sl
|
|
%rename kicad-locales-sv
|
|
%rename kicad-locales-zh-cn
|
|
|
|
|
|
%description
|
|
KiCad is an EDA software to design electronic schematic
|
|
diagrams and printed circuit board artwork up to 16 layers.
|
|
KiCad is a set of four softwares and a project manager:
|
|
- KiCad: project manager
|
|
- Eeschema: schematic entry
|
|
- Pcbnew: board editor
|
|
- Cvpcb: footprint selector for components used in the circuit design
|
|
- Gerbview: GERBER viewer (photoplotter documents)
|
|
|
|
%files -f %{name}.lang
|
|
%{_bindir}/*
|
|
%{_libdir}/%{name}
|
|
%{_datadir}/%{name}/
|
|
%{_datadir}/applications/*.desktop
|
|
%{_datadir}/icons/hicolor/*/mimetypes/application-x-*.*
|
|
%{_datadir}/icons/hicolor/*/apps/*.*
|
|
%{_datadir}/mime/packages/%{name}.xml
|
|
%{_datadir}/mimelnk/application/x-%{name}-*.desktop
|
|
#%config(noreplace) %{_sysconfdir}/ld.so.conf.d/kicad.conf
|
|
%dir %{_docdir}/%{name}/
|
|
%{_docdir}/%{name}/*.txt
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package doc
|
|
Summary: Documentation for KiCad
|
|
Group: Documentation
|
|
License: GPLv2+
|
|
BuildArch: noarch
|
|
|
|
%description doc
|
|
Documentation and tutorials for KiCad in English.
|
|
|
|
%files doc
|
|
%dir %{_docdir}/%{name}/
|
|
%{_docdir}/%{name}/contrib
|
|
#%{_docdir}/%{name}/help/
|
|
%{_docdir}/%{name}/help/en
|
|
%{_docdir}/%{name}/help/file_formats
|
|
#%{_docdir}/%{name}/tutorials
|
|
%{_docdir}/%{name}/tutorials/en
|
|
%{_docdir}/%{name}/scripts
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package doc-de
|
|
Summary: Documentation for KiCad in German
|
|
Group: Documentation
|
|
Requires: %{name}-doc = %{EVRD}
|
|
Requires: locales-de
|
|
BuildArch: noarch
|
|
|
|
%description doc-de
|
|
Documentation and tutorials for KiCad in German
|
|
|
|
%files doc-de
|
|
%{_docdir}/%{name}/help/de
|
|
%{_docdir}/%{name}/tutorials/de
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package doc-es
|
|
Summary: Documentation for KiCad in Spanish
|
|
Group: Documentation
|
|
Requires: %{name}-doc = %{EVRD}
|
|
Requires: locales-es
|
|
BuildArch: noarch
|
|
|
|
%description doc-es
|
|
Documentation and tutorials for KiCad in Spanish
|
|
|
|
%files doc-es
|
|
%{_docdir}/%{name}/help/es
|
|
%{_docdir}/%{name}/tutorials/es
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package doc-fr
|
|
Summary: Documentation for KiCad in French
|
|
Group: Documentation
|
|
Requires: %{name}-doc = %{EVRD}
|
|
Requires: locales-fr
|
|
BuildArch: noarch
|
|
|
|
%description doc-fr
|
|
Documentation and tutorials for KiCad in French
|
|
|
|
%files doc-fr
|
|
%{_docdir}/%{name}/help/fr
|
|
%{_docdir}/%{name}/tutorials/fr
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package doc-hu
|
|
Summary: Documentation for KiCad in Hungarian
|
|
Group: Documentation
|
|
Requires: %{name}-doc = %{EVRD}
|
|
Requires: locales-hu
|
|
BuildArch: noarch
|
|
|
|
%description doc-hu
|
|
Documentation and tutorials for KiCad in Hungarian
|
|
|
|
%files doc-hu
|
|
%{_docdir}/%{name}/tutorials/hu
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package doc-it
|
|
Summary: Documentation for KiCad in Italian
|
|
Group: Documentation
|
|
Requires: %{name}-doc = %{EVRD}
|
|
Requires: locales-it
|
|
BuildArch: noarch
|
|
|
|
%description doc-it
|
|
Documentation and tutorials for KiCad in Italian
|
|
|
|
%files doc-it
|
|
%{_docdir}/%{name}/help/it
|
|
%{_docdir}/%{name}/tutorials/it
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package doc-ja
|
|
Summary: Documentation for KiCad in Japanese
|
|
Group: Documentation
|
|
Requires: %{name}-doc = %{EVRD}
|
|
Requires: locales-ja
|
|
BuildArch: noarch
|
|
|
|
%description doc-ja
|
|
Documentation and tutorials for KiCad in Japanese
|
|
|
|
%files doc-ja
|
|
%{_docdir}/%{name}/help/ja
|
|
%{_docdir}/%{name}/tutorials/ja
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package doc-pl
|
|
Summary: Documentation for KiCad in Polish
|
|
Group: Documentation
|
|
Requires: %{name}-doc = %{EVRD}
|
|
Requires: locales-pl
|
|
BuildArch: noarch
|
|
|
|
%description doc-pl
|
|
Documentation and tutorials for KiCad in Polish
|
|
|
|
%files doc-pl
|
|
%{_docdir}/%{name}/help/pl
|
|
%{_docdir}/%{name}/tutorials/pl
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package doc-pt
|
|
Summary: Documentation for KiCad in Portuguese
|
|
Group: Documentation
|
|
Requires: %{name}-doc = %{EVRD}
|
|
Requires: locales-pt
|
|
BuildArch: noarch
|
|
|
|
%description doc-pt
|
|
Documentation and tutorials for KiCad in Portuguese
|
|
|
|
%files doc-pt
|
|
%{_docdir}/%{name}/help/pt
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package doc-ru
|
|
Summary: Documentation for KiCad in Russian
|
|
Group: Documentation
|
|
Requires: %{name}-doc = %{EVRD}
|
|
Requires: locales-ru
|
|
BuildArch: noarch
|
|
|
|
%description doc-ru
|
|
Documentation and tutorials for KiCad in Russian
|
|
|
|
%files doc-ru
|
|
%{_docdir}/%{name}/help/ru
|
|
%{_docdir}/%{name}/tutorials/ru
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package doc-zh_CN
|
|
Summary: Documentation for KiCad in Chinese
|
|
Group: Documentation
|
|
Requires: %{name}-doc = %{EVRD}
|
|
Requires: locales-zh
|
|
BuildArch: noarch
|
|
|
|
%description doc-zh_CN
|
|
Documentation and tutorials for KiCad in Chinese
|
|
|
|
%files doc-zh_CN
|
|
%{_docdir}/%{name}/tutorials/zh_CN
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -q -a 1 -a 2 -a 3 -a 7 -a 8
|
|
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
|
|
#kicad-doc.noarch: W: file-not-utf8 /usr/share/doc/kicad/AUTHORS.txt
|
|
iconv -f iso8859-1 -t utf-8 AUTHORS.txt > AUTHORS.conv && mv -f AUTHORS.conv AUTHORS.txt
|
|
|
|
|
|
#multilibs
|
|
%ifarch x86_64 sparc64 ppc64 amd64 s390x
|
|
se} -i "s|KICAD_PLUGINS lib/kicad/plugins|KICAD_PLUGINS lib64/kicad/plugins|" CMakeLists.txt
|
|
#%{__sed} -i "s|/usr/lib/kicad|/usr/lib64/kicad|" %{SOURCE3}
|
|
%endif
|
|
|
|
|
|
%build
|
|
# Add Epcos library
|
|
cd Epcos-MKT-1.0
|
|
cp -pR library ../%{name}-libraries-%{version}/
|
|
cp -pR modules ../%{name}-libraries-%{version}/
|
|
cd ..
|
|
|
|
# Add Walter libraries
|
|
cd %{name}-walter-libraries-%{version}
|
|
cp -pR library ../%{name}-libraries-%{version}/
|
|
cp -pR modules ../%{name}-libraries-%{version}/
|
|
cd ..
|
|
|
|
#
|
|
# Symbols libraries
|
|
#
|
|
pushd %{name}-libraries-%{version}/
|
|
%cmake -DKICAD_STABLE_VERSION=OFF
|
|
%make -j1 VERBOSE=1
|
|
popd
|
|
|
|
|
|
#
|
|
# Core components
|
|
#
|
|
%cmake -DKICAD_STABLE_VERSION=OFF -DKICAD_SKIP_BOOST=ON \
|
|
-DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-config
|
|
%make VERBOSE=1
|
|
|
|
|
|
%install
|
|
%makeinstall_std -C build
|
|
|
|
# install localization
|
|
cd %{name}-doc-%{version}/internat
|
|
for dir in bg ca cs de es fr hu it ko nl pl pt ru sl sv zh_CN
|
|
do
|
|
install -m 644 -D ${dir}/%{name}.mo %{buildroot}%{_datadir}/locale/${dir}/LC_MESSAGES/%{name}.mo
|
|
done
|
|
cd ../..
|
|
|
|
|
|
# install desktop
|
|
for desktopfile in %{buildroot}%{_datadir}/applications/*.desktop ; do
|
|
desktop-file-install \
|
|
--dir %{buildroot}%{_datadir}/applications \
|
|
--remove-category Development \
|
|
--delete-original \
|
|
${desktopfile}
|
|
done
|
|
|
|
#
|
|
# Symbols libraries
|
|
#
|
|
pushd %{name}-libraries-%{version}/
|
|
%makeinstall_std -C build
|
|
popd
|
|
|
|
# install template
|
|
install -d %{buildroot}%{_datadir}/%{name}/template
|
|
install -m 644 template/%{name}.pro %{buildroot}%{_datadir}/%{name}/template
|
|
|
|
# Footprints
|
|
pushd %{name}-footprints-%{version}/
|
|
cp -a */ %{buildroot}%{_datadir}/%{name}/modules
|
|
popd
|
|
ln -f %{buildroot}%{_datadir}/%{name}/template/fp-lib-table{.for-pretty,}
|
|
|
|
# Preparing for documentation pull-ups
|
|
rm -f %{name}-doc-%{version}/doc/help/CMakeLists.txt
|
|
rm -f %{name}-doc-%{version}/doc/help/makefile
|
|
rm -f %{name}-doc-%{version}/doc/tutorials/CMakeLists.txt
|
|
|
|
cp -pr %{name}-doc-%{version}/doc/* %{buildroot}%{_docdir}/%{name}
|
|
cp -pr AUTHORS.txt CHANGELOG* %{buildroot}%{_docdir}/%{name}
|
|
|
|
%find_lang %{name}
|
|
|