← Back to team overview

kicad-developers team mailing list archive

Re: Packaging question

 

On 02/25/2018 07:31 PM, Wayne Stambaugh wrote:
> 
> 
> On 02/25/2018 07:25 PM, Rene Pöschl wrote:
>> On 25/02/18 23:29, Wayne Stambaugh wrote:
>>> Stephen,
>>>
>>> I would say that you should pull from HEAD of each library.  This will
>>> probably be acceptable up to the stable release.  At this point we will
>>> have to tag each repo.  Are any of our library devs planning on doing
>>> any major reorganization of the libraries between now and the stable
>>> release?  If so, than we may want to tag the library repos for rc1.
>>>
>>> Cheers,
>>>
>>> Wayne
>>>
>>
>> I asked a week or so ago if i should tag. Your response was that it is unnecessary. Otherwise i would have tagged the libs back then.
>> l
>> As i do not yet plan to ban major changes, i tagged the repos with "v5.0.0-rc1"
>>
> 
> Rene,
> 
> I don't think there is a major issue here but tagging rc1 wont hurt anything.  The main thing I am worried about is the stable release and that the library layout structure and the library names remain constant throughout the stable 5 release series unless the user specifically chooses to install newer libraries.  Between now and the stable release, I do expect some changes to the libraries but we can tag as we go if we need to.

There are a lot of issues here that I am not necessarily competent to answer, so let me just propose a quick patch to get the copr builds to at least use the v5 libraries instead of the v4 libraries.  That will potentially enable more Fedora users to test with a consistent v5 of kicad, so I see it as a step in the right direction.

I've attached the patch, and I've tested it in my copr repo here: https://copr.fedorainfracloud.org/coprs/stevenfalco/kicad/

Basically, this patch replaces the v4 kicad-library repo with the v5 kicad-footprints, kicad-packages3D, kicad-templates and kicad-symbols repos.  It also sets KICAD_VERSION_EXTRA to the git "commit-count.SHA" so the version is more visible in the help:about dialog.

I received a pm from a developer off-list, who wants to split the package into separate components, uncoupling the libs from the executables.  That seems like a great idea to me, and lines up with the debian proposal, but clearly that will take more effort to put in place.

Please let me know if this patch is acceptable, or if you need further changes.

	Steve


> 
> Cheers,
> 
> Wayne
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

diff --git a/.gitignore b/.gitignore
index b6a2630..91f7aa8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,22 +1,5 @@
-kicad-2010.05.27.tar.bz2
-kicad-doc-2010.05.27.tar.bz2
-kicad-libraries-2010.05.27.tar.bz2
-/kicad-2011.01.28.tar.bz2
-/kicad-doc-2011.01.28.tar.bz2
-/kicad-libraries-2011.01.28.tar.bz2
-/kicad-2011.07.12.tar.bz2
-/kicad-doc-2011.07.12.tar.bz2
-/kicad-libraries-2011.07.12.tar.bz2
-/Epcos-MKT-1.0.tar.bz2
-/kicad-2012.01.19.tar.bz2
-/kicad-libraries-2012.01.19.tar.bz2
-/kicad-doc-2012.01.19.tar.bz2
-/kicad-2013.06.11.tar.bz2
-/kicad-libraries-2013.06.11.tar.bz2
-/kicad-walter-libraries-2013.06.11.tar.bz2
-/kicad-doc-2013.06.11.tar.bz2
-/kicad-2014.03.13.tar.xz
-/kicad-libraries-2014.03.13.tar.xz
-/kicad-doc-2014.03.13.tar.xz
-/kicad-walter-libraries-2014.03.13.tar.xz
-/kicad-footprints-2014.03.13.tar.xz
+*.tar.gz
+kicad*.bzr
+kicad-i18n
+*.src.rpm
+kicad.spec
diff --git a/kicad-clone.sh b/kicad-clone.sh
index d0d3352..15da53a 100755
--- a/kicad-clone.sh
+++ b/kicad-clone.sh
@@ -10,13 +10,40 @@ else
 	git clone https://git.launchpad.net/kicad kicad.bzr
 fi
 
-if [ -d kicad-library.bzr ]; then
-	cd kicad-library.bzr
+if [ -d kicad-symbols.bzr ]; then
+	cd kicad-symbols.bzr
 	git fetch origin
 	git reset --hard origin/master
 	cd ..
 else
-	git clone https://github.com/KiCad/kicad-library.git kicad-library.bzr
+	git clone https://github.com/KiCad/kicad-symbols.git kicad-symbols.bzr
+fi
+
+if [ -d kicad-footprints.bzr ]; then
+	cd kicad-footprints.bzr
+	git fetch origin
+	git reset --hard origin/master
+	cd ..
+else
+	git clone https://github.com/KiCad/kicad-footprints.git kicad-footprints.bzr
+fi
+
+if [ -d kicad-packages3D.bzr ]; then
+	cd kicad-packages3D.bzr
+	git fetch origin
+	git reset --hard origin/master
+	cd ..
+else
+	git clone https://github.com/KiCad/kicad-packages3D.git kicad-packages3D.bzr
+fi
+
+if [ -d kicad-templates.bzr ]; then
+	cd kicad-templates.bzr
+	git fetch origin
+	git reset --hard origin/master
+	cd ..
+else
+	git clone https://github.com/KiCad/kicad-templates.git kicad-templates.bzr
 fi
 
 if [ -d kicad-i18n ]; then
diff --git a/kicad-export.sh b/kicad-export.sh
index 05aaaba..e7b4f87 100755
--- a/kicad-export.sh
+++ b/kicad-export.sh
@@ -9,7 +9,7 @@ get_last_rev()
 }
 
 MAIN_REV=$(get_last_rev kicad.bzr)
-LIB_REV=$(get_last_rev kicad-library.bzr)
+#LIB_REV=$(get_last_rev kicad-library.bzr)
 #DOC_REV=$(get_last_rev kicad-doc.bzr)
 TIMESTAMP="$MAIN_REV"
 
@@ -21,10 +21,21 @@ git archive --format=tar.gz --prefix=kicad-$TIMESTAMP/ HEAD > ../kicad-$TIMESTAM
 #tar cJf ../kicad-$TIMESTAMP.tar.xz kicad-$TIMESTAMP
 #rm -rf kicad-$TIMESTAMP
 
-cd ../kicad-library.bzr
-echo "Creating kicad-libraries-$TIMESTAMP.tar.gz ..."
-git archive --format=tar.gz --prefix=kicad-libraries-$TIMESTAMP/ HEAD > ../kicad-libraries-$TIMESTAMP.tar.gz
+cd ../kicad-symbols.bzr
+echo "Creating kicad-symbols-$TIMESTAMP.tar.gz ..."
+git archive --format=tar.gz --prefix=kicad-symbols-$TIMESTAMP/ HEAD > ../kicad-symbols-$TIMESTAMP.tar.gz
 
+cd ../kicad-footprints.bzr
+echo "Creating kicad-footprints-$TIMESTAMP.tar.gz ..."
+git archive --format=tar.gz --prefix=kicad-footprints-$TIMESTAMP/ HEAD > ../kicad-footprints-$TIMESTAMP.tar.gz
+
+cd ../kicad-packages3D.bzr
+echo "Creating kicad-packages3D-$TIMESTAMP.tar.gz ..."
+git archive --format=tar.gz --prefix=kicad-packages3D-$TIMESTAMP/ HEAD > ../kicad-packages3D-$TIMESTAMP.tar.gz
+
+cd ../kicad-templates.bzr
+echo "Creating kicad-templates-$TIMESTAMP.tar.gz ..."
+git archive --format=tar.gz --prefix=kicad-templates-$TIMESTAMP/ HEAD > ../kicad-templates-$TIMESTAMP.tar.gz
 
 cd ../kicad-i18n
 echo "Creating kicad-i18n-$TIMESTAMP.tar.gz ..."
diff --git a/kicad.spec.template b/kicad.spec.template
index 55d85d6..139d378 100644
--- a/kicad.spec.template
+++ b/kicad.spec.template
@@ -28,8 +28,11 @@ URL:            http://www.kicad-pcb.org
 Source:         %{name}-%{version}.tar.gz
 #Source: https://github.com/KiCad/kicad-source-mirror/archive/%{commit}/kicad-source-mirror-%{commit}.tar.gz
 Source1:        %{name}-i18n-%{version}.tar.gz
-Source2:        %{name}-libraries-%{version}.tar.gz
-#Source3:        %{name}-footprints-%{version}.tar.xz
+#Source2:        %{name}-libraries-%{version}.tar.gz
+Source3:        %{name}-footprints-%{version}.tar.gz
+Source4:        %{name}-symbols-%{version}.tar.gz
+Source5:	%{name}-packages3D-%{version}.tar.gz
+Source6:	%{name}-templates-%{version}.tar.gz
 #Source7:        Epcos-MKT-1.0.tar.bz2
 #Source8:        %{name}-walter-libraries-%{version}.tar.xz
 #disabled, breaks in devel version
@@ -86,7 +89,7 @@ Kicad est un ensemble de quatres logiciels et un gestionnaire de projet :
 
 
 %prep
-%setup -q -a 1 -a 2
+%setup -q -a 1 -a 3 -a 4 -a 5 -a 6
 
 #%patch1 -p1
 
@@ -121,13 +124,28 @@ iconv -f iso8859-1 -t utf-8 AUTHORS.txt > AUTHORS.conv && mv -f AUTHORS.conv AUT
 #cd ..
 
 #
-# Symbols libraries
+# Footprint and symbol libraries
 #
-pushd %{name}-libraries-%{version}/
+
+pushd %{name}-footprints-%{version}/
+%cmake -DKICAD_STABLE_VERSION=OFF
+%{__make} -j3 VERBOSE=1
+popd
+
+pushd %{name}-symbols-%{version}/
 %cmake -DKICAD_STABLE_VERSION=OFF
 %{__make} -j3 VERBOSE=1
 popd
 
+pushd %{name}-packages3D-%{version}/
+%cmake -DKICAD_STABLE_VERSION=OFF
+%{__make} -j3 VERBOSE=1
+popd
+
+pushd %{name}-templates-%{version}/
+%cmake -DKICAD_STABLE_VERSION=OFF
+%{__make} -j3 VERBOSE=1
+popd
 
 #
 # Core components
@@ -153,7 +171,10 @@ fi
 				  -DKICAD_SCRIPTING=OFF \
 				  -DKICAD_SCRIPTING_MODULES=OFF \
 				  -DKICAD_SCRIPTING_WXPYTHON=OFF \
+          -DKICAD_USE_OCE=OFF \
+          -DKICAD_SPICE=OFF \
           -DCMAKE_BUILD_TYPE=Debug \
+          -DKICAD_VERSION_EXTRA=REVISION_NUMBER \
           -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/%{wx_config}
 # workaround to get WXPYTHON_VERSION set in config.h
 make rebuild_cache
@@ -191,22 +212,29 @@ for desktopfile in %{buildroot}%{_datadir}/applications/*.desktop ; do
   ${desktopfile}
 done
 
-#
-# Symbols libraries
-#
-pushd %{name}-libraries-%{version}/
-%{__make} INSTALL="install -p" DESTDIR=%{buildroot} install
-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,}
+pushd %{name}-footprints-%{version}/
+%{__make} INSTALL="install -p" DESTDIR=%{buildroot} install
+popd
+
+# Symbols
+pushd %{name}-symbols-%{version}/
+%{__make} INSTALL="install -p" DESTDIR=%{buildroot} install
+popd
+
+# 3D models
+pushd %{name}-packages3D-%{version}/
+%{__make} INSTALL="install -p" DESTDIR=%{buildroot} install
+popd
+
+# Templates
+pushd %{name}-templates-%{version}/
+%{__make} INSTALL="install -p" DESTDIR=%{buildroot} install
+popd
 
 # Preparing for documentation pull-ups
 #%{__rm} -f  %{name}-doc-%{version}/doc/help/CMakeLists.txt
@@ -265,6 +293,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
 
 
 %changelog
+* Sun Feb 25 2018 Steven A. Falco <stevenfalco@xxxxxxxxx>
+- Use Kicad 5 libraries
+
 * Sat Jan 30 2016 Miguel Ángel Ajo <miguelangel@xxxxxx>
 - Import the stable branch 4.0.0 patch for nostrip
 
diff --git a/sources b/sources
index 28c84a7..ee2729a 100644
--- a/sources
+++ b/sources
@@ -1,9 +1,6 @@
-8fc31113a865493f83c0978bca4896c8  kicad-5430.tar.xz
-9f4adb0b808e5bcfa91f3a430807c300  kicad-9.5377.tar.xz
-bfcbbb15267645f47d7965c3ea113cb7  kicad-doc-5430.tar.xz
-31b432a75974a44ff5b39b9f553cddaf  kicad-doc-9.5377.tar.xz
-5b311b66edf14057df4fa5682754c7c7  kicad-doc-nightlies.tar.xz
-d5f709c2cf5e9fd8e4defb64e8ad2392  kicad-libraries-5430.tar.xz
-3d42931886a4b20d5940e85ae77246a5  kicad-libraries-9.5377.tar.xz
-e90d12ed7b3723e9c927e3de73de44a4  kicad-libraries-nightlies.tar.xz
-2ca14836d3c23a178c0cd5de02538ad4  kicad-nightlies.tar.xz
+8faead3016a037492bc2ae3594b8a0d9  kicad-footprints-r12226.be8bb2439.tar.gz
+855d0e2786dc31cd6b1703350652fba9  kicad-i18n-r12226.be8bb2439.tar.gz
+4e25ea83aadbad60bb6d4d940a748905  kicad-packages3D-r12226.be8bb2439.tar.gz
+bf2d34c526bdc83b4791ea9f6e6c28cb  kicad-r12226.be8bb2439.tar.gz
+2eab9a15dcf5fe4078cd67ce23feb10f  kicad-symbols-r12226.be8bb2439.tar.gz
+83786ce5d0bd114463f0d99f039cf83c  kicad-templates-r12226.be8bb2439.tar.gz

Follow ups

References