Author Topic: Help needed with first attempt at packaging (Updating DigiKam)  (Read 1574 times)

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Help needed with first attempt at packaging (Updating DigiKam)
« on: December 19, 2010, 12:24:54 PM »
Alright, so I set up PCLOS LXDE 2010.12 in a VM, installed pkgutils-thunar, and downloaded the source rpm for Digikam 1.6.0. Then I installed it. In the spec file, I changed the version number and added the update to the changelog. I downloaded the new source and replaced the old one with it. I installed the build dependencies. Is that all I need to do? Can I now build digiCam or are there some other steps I need to take.
« Last Edit: January 28, 2011, 03:54:15 PM by Aradalf »

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Help needed with first attempt at packaging (Updating DigiKam)
« Reply #1 on: December 19, 2010, 02:42:21 PM »
Follow-up post:

After trying to build digikam, I get the following error:
make[2]: *** No rule to make target `/usr/lib/libkdcraw.so', needed by `lib/libdigikamcore.so.1.0.0'.  Stop.
make[1]: *** [digikam/CMakeFiles/digikamcore.dir/all] Error 2
make: *** [all] Error 2
error: Bad exit status from /home/aradalf/src/tmp/rpm-tmp.14348 (%build)


RPM build errors:
    Bad exit status from /home/aradalf/src/tmp/rpm-tmp.14348 (%build)

This is the entire output.

EDIT: Why was this moved? Isn't the Packagers section the correct section to post questions about packaging?
« Last Edit: December 19, 2010, 03:03:48 PM by Aradalf »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Help needed with first attempt at packaging(Updating Digikam)
« Reply #2 on: December 19, 2010, 02:51:10 PM »
Could you post your spec file, please?

Search the Packagers section for these errors. The libkdcraw.so is the easiest to correct, I think. A change from libkdcraw.so.0 tolibkdcraw.so.1 in your spec file should do it.

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Help needed with first attempt at packaging (Updating DigiKam)
« Reply #3 on: December 19, 2010, 02:55:24 PM »
My spec file:
Code: [Select]
%define _requires_exceptions devel(libpulsecommon-0.9.21)\\|devel(libnvidia-tls)\\|devel(libGLcore)

%define revision 7

%define major      1
%define libname    %mklibname digikam %major
%define libnamedev %mklibname digikam -d
%define oldlibnamedev %mklibname digikam %major -d
%define libdigikamdatabase %mklibname digikamdatabase 1
%define libdigikamcore %mklibname digikamcore 1

Name:          digikam
Version:       1.7.0
Release:       %mkrel 1
License:       GPLv2+
Url:           http://www.digikam.org
Group:         Graphical desktop/KDE4
Source0:       %{name}-%{version}.tar.xz
Source2:       showfoto.desktop
Source3: digiKam-splash.png
Source4: showfoto-splash.png
Summary:       A KDE photo management utility
BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: kdelibs4-devel
BuildRequires: kdepimlibs4-devel
BuildRequires: kdegraphics4-devel
BuildRequires: sqlite3-devel
BuildRequires: libjasper-devel
BuildRequires: libgphoto-devel
BuildRequires: libtiff-devel
BuildRequires: lcms-devel
BuildRequires: lensfun-devel
BuildRequires: liblqr-devel >= 0.4.0
BuildRequires: kipi-plugins-devel
BuildRequires: kdeedu4-devel
Requires:      kdebase4-runtime
Requires:      qt4-database-plugin-sqlite
Requires:      kipi-plugins
Requires: libexiv2_9
Obsoletes:     %name < %version
Requires: glibc >= 2.10.1
Requires: libstdc++6 >= 4.4.1
Requires: marble
Requires: marble-common
Requires: libkdeeduui4
Requires: kdeedu4-core


%description
DigiKam is an advanced digital photo management application for KDE.
Photos can be collected into albums which can be sorted chronologically,
by directory layout or by custom collections.

DigiKam also provides tagging functionality. Images can be tagged despite of
their position and digiKam provides fast and intuitive ways to browse them.
User comments and customized meta-information added to images, are stored
into a database and retrieved to make them available into the user interface.
As soon as the camera is plugged in digikam allows you to preview, download,
upload and delete images.

Digikam also includes tools like Image Editor, to modify photos using plugins
such as red eye correction or Gamma correction, exif management,...

Digikam also uses KIPI plugins (KDE Image Plugin Interface) to increase
its functionalities.

%description -l de
Digikam ist eine fortgeschrittene digitale Foto-Management-Anwendung für KDE.
Fotos können in Alben, die chronologisch sortiert werden können gesammelt werden,
Verzeichnisse und Layout oder dem Gewohnheitsrecht Sammlungen.

%description -l fr
Digikam est une application numérique de pointe de gestion de photos pour KDE.
Les photos peuvent être recueillies dans des albums qui peuvent être triés par ordre chronologique,
par structure de répertoires ou par les collections personnalisées.

%description -l es
DigiKam es una avanzada aplicación de gestión de fotos digitales para KDE.
Las fotos pueden ser recogidas en álbumes que pueden ser ordenados cronológicamente,
por disposición de directorios o de colecciones personalizadas.

%description -l pl
Digikam to zaawansowany program do zarządzania Fotografia cyfrowa dla KDE.
Zdjęcia mogą być gromadzone w albumach, które mogą być posortowane w porządku chronologicznym,
przez układ katalogów lub kolekcji niestandardowych.

%description -l sr
ДигиКам је напредни дигитални фото за управљање за апликације за КДЕ.
Фотографије се могу прикупљати у албуме који могу бити сортирани по хронолошком реду,
по каталогу прилагођени распоред или збирки.

%description -l nl
DigiKam is een geavanceerde digitale foto management applicatie voor KDE.
Foto's kunnen worden verzameld in albums die chronologisch,
door directory lay-out of door aangepaste collecties gesorteerd kunnen worden.


%files -f %name.lang
%defattr(-,root,root)
%_kde_bindir/digikam
%_kde_bindir/digitaglinktree
%_kde_bindir/cleanup_digikamdb
%_kde_appsdir/digikam
#%_kde_datadir/kde4/services/*
%_kde_datadir/kde4/servicetypes/digikamimageplugin.desktop
%_kde_mandir/*
%_kde_datadir/applications/kde4/digikam.desktop
%_kde_appsdir/solid/actions/digikam-opencamera.desktop
%_kde_iconsdir/hicolor/*/apps/digikam.*

%_kde_libdir/libdigikamdatabase.so.*
%_kde_libdir/libdigikamcore.so.*

%_kde_libdir/kde4/libexec/digikamdatabaseserver

%_kde_libdir/kde4/digikamimageplugin_color.so
%_kde_libdir/kde4/digikamimageplugin_decorate.so
%_kde_libdir/kde4/digikamimageplugin_enhance.so
%_kde_libdir/kde4/digikamimageplugin_fxfilters.so
%_kde_libdir/kde4/digikamimageplugin_transform.so
%_kde_libdir/kde4/digikamnepomukservice.so
%_kde_libdir/kde4/kio_digikamalbums.so
%_kde_libdir/kde4/kio_digikamdates.so
%_kde_libdir/kde4/kio_digikamsearch.so
%_kde_libdir/kde4/kio_digikamtags.so

%_kde_datadir/kde4/services/digikamalbums.protocol
%_kde_datadir/kde4/services/digikamdates.protocol
%_kde_datadir/kde4/services/digikamimageplugin_color.desktop
%_kde_datadir/kde4/services/digikamimageplugin_decorate.desktop
%_kde_datadir/kde4/services/digikamimageplugin_enhance.desktop
%_kde_datadir/kde4/services/digikamimageplugin_fxfilters.desktop
%_kde_datadir/kde4/services/digikamimageplugin_transform.desktop
%_kde_datadir/kde4/services/digikamnepomukservice.desktop
%_kde_datadir/kde4/services/digikamsearch.protocol
%_kde_datadir/kde4/services/digikamtags.protocol

%_kde_libdir/kde4/plugins/marble/ExternalDraw.so

#---------------------------------------------

%package -n %{name}-showfoto
Summary:        Showfoto program for %{name}
Group:          Graphical desktop/KDE4
Requires: %{name}
Provides: showfoto

%description -n %{name}-showfoto
The package contains showfoto for %{name}.

%files -n %{name}-showfoto
%defattr(-,root,root)
%_kde_bindir/showfoto
%_kde_appsdir/showfoto
%_kde_iconsdir/hicolor/*/apps/showfoto.*
%_kde_datadir/applications/kde4/showfoto.desktop


#---------------------------------------------

%package        devel
Summary:        Static libraries and headers for %{name}
Group:          Graphical desktop/KDE4
Provides:       %{name}-devel = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
Obsoletes: %{name}-devel < %version

%description  devel
%{libnamedev} contains the libraries and header files needed to
develop programs which make use of %{name}.
The library documentation is available on header files.

%files devel
%defattr(0644, root, root, 0755)
%dir %_kde_includedir/digikam
%_kde_includedir/digikam/*.h
%_kde_includedir/digikam_export.h
%_kde_libdir/libdigikamcore.so
%_kde_libdir/libdigikamdatabase.so

#------------------------------------------------

%prep
%setup -q -n %{name}-%{version}


%build

%cmake_kde4

%make

%install
rm -rf %buildroot
%{makeinstall_std} -C build

%find_lang %{name}

# Translation the modified desktop file
install -m 0644 %SOURCE2  %buildroot/%_kde_datadir/applications/kde4/

#CUSTOM BOOTSPLASH
install -m 0644 %SOURCE3 %buildroot/%_datadir/apps/digikam/data/splash-digikam.png

install -m 0644 %SOURCE4 %buildroot/%_datadir/apps/showfoto/data/splash-showfoto.png

#MENU
desktop-file-install --vendor="" \
  --remove-category="Application" \
  --add-category="X-MandrivaLinux-Multimedia-Graphics" \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications/kde4 $RPM_BUILD_ROOT%{_datadir}/applications/kde4/digikam.desktop

desktop-file-install --vendor="" \
  --remove-category="Application" \
  --add-category="X-MandrivaLinux-Multimedia-Graphics" \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications/kde4 $RPM_BUILD_ROOT%{_datadir}/applications/kde4/showfoto.desktop


%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%clean
rm -rf %buildroot


%changelog
* Sun Dec 19 2010 Aradalf <aradalf at rocketmail.com> 1.7.0-1pclos2010
- 1.7.0

* Tue Nov 23 2010 Texstar <texstar at gmail.com> 1.6.0-1pclos2010
- 1.6.0

* Mon Oct 11 2010 Texstar <texstar at gmail.com> 1.5.0-1pclos2010
- 1.5.0

* Sun Aug 29 2010 Texstar <texstar at gmail.com> 1.4.0-2pclos2010
- rebuild for 4.5.1

* Sun Aug 22 2010 Texstar <texstar at gmail.com> 1.4.0-1pclos2010
- 1.4.0

* Sun Aug 15 2010 Texstar <texstar at gmail.com> 1.3.0-6pclos2010
- rebuild for 4.5.0
- add marble geolocation support


* Mon Aug 09 2010 Texstar <texstar at gmail.com> 1.3.0-5pclos2010
- rebuild

* Sat Aug 07 2010 Texstar <texstar at gmail.com> 1.3.0-4pclos2010
- rebuild

* Wed Aug 04 2010 Texstar <texstar at gmail.com> 1.3.0-3pclos2010
- rebuild libjpeg8

* Tue Jul 20 2010 Texstar <texstar at gmail.com> 1.3.0-2pclos2010
- rebuild

* Wed Jun 09 2010 Texstar <texstar at gmail.com> 1.3.0-1pclos2010
- 1.3.0

* Fri May 28 2010 Texstar <texstar at gmail.com> 1.2.0-2pclos2010
- add patches

* Mon Mar 29 2010 Texstar <texstar at gmail.com> 1.2.0-1pclos2010
- 1.2.0

* Thu Mar 25 2010 Texstar <texstar at gmail.com> 1.1.0-6pclos2010
- rebuild

* Tue Mar 23 2010 Texstar <texstar at gmail.com> 1.1.0-5pclos2010
- split out showfoto package

* Sun Mar 14 2010 Texstar <texstar at gmail.com> 1.1.0-4pclos2010
- rebuild

* Tue Mar 09 2010 Texstar <texstar at gmail.com> 1.1.0-3pclos2010
- rebuild with out kdeedu4-devel package

* Tue Mar 02 2010 Texstar <texstar at gmail.com> 1.1.0-2pclos2010
- rebuild against kde 4.4.1

* Sun Jan 31 2010 Texstar <texstar at gmail.com> 1.1.0-1pclos2010
- 1.1.0

* Thu Jan 28 2010 Texstar <texstar at gmail.com> 1.0-2pclos2010
- rebuild

* Tue Dec 22 2009 Texstar <texstar at gmail.com> 1.0-1pclos2010
- 1.0 woo hoo

* Tue Dec 01 2009 Texstar <texstar at gmail.com> 1.0.0-rc-1pclos2010
- rc1

* Thu Nov 11 2009 Texstar <texstar at gmail.com> 1.0.0-beta6-1pclos2010
- beta 6
- new splash screens

* Sat Oct 03 2009 Texstar <texstar at gmail.com> 1.0.0-beta4.3pclos2010
- rebuild and enable showfoto again

* Mon Aug 31 2009 Texstar <texstar at gmail.com> 1.0.0-beta4.2pclos2009
- beta 4 final
- dont build broken showfoto

* Thu Aug 12 2009 Texstar <texstar at gmail.com> 1.0.0-beta4.1pclos2009
- update from svn

* Wed Jul 29 2009 pcserver <pcserver at hushmail.com> 1.0.0-beta3.2pclos2009
- rebuild without kdeedu4 devel

* Sun Jul 26 2009 pcserver <pcserver at hushmail.com> 1.0.0-beta3.1pclos2009
- update for kde 4
« Last Edit: December 19, 2010, 03:03:35 PM by Aradalf »

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12501
Re: Help needed with first attempt at packaging (Updating DigiKam)
« Reply #4 on: December 19, 2010, 03:04:28 PM »
Follow-up post:

After trying to build digikam, I get the following error:
make[2]: *** No rule to make target `/usr/lib/libkdcraw.so', needed by `lib/libdigikamcore.so.1.0.0'.  Stop.
make[1]: *** [digikam/CMakeFiles/digikamcore.dir/all] Error 2
make: *** [all] Error 2
error: Bad exit status from /home/aradalf/src/tmp/rpm-tmp.14348 (%build)


RPM build errors:
    Bad exit status from /home/aradalf/src/tmp/rpm-tmp.14348 (%build)

This is the entire output.

EDIT: Why was this moved? Isn't the Packagers section the correct section to post questions about packaging?


Install kdegraphics4-devel

Thanks to everyone who donates. You keep the servers running.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Help needed with first attempt at packaging(Updating Digikam)
« Reply #5 on: December 19, 2010, 03:07:20 PM »
%define major needs to be upped by 1 to correct the libkdcraw.so error.

Do you have cmake installed?


Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Help needed with first attempt at packaging (Updating DigiKam)
« Reply #6 on: December 19, 2010, 03:12:23 PM »
I have both kdegraphics4-devel and cmake already installed. I have changed %define major to 2. Can you explain why it has to be changed.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Help needed with first attempt at packaging (Updating DigiKam)
« Reply #7 on: December 19, 2010, 03:19:31 PM »
A new version always has a new, higher number. This always includes libs like lib-whatever-.so (major).


Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Help needed with first attempt at packaging (Updating DigiKam)
« Reply #8 on: December 19, 2010, 05:01:19 PM »
I have both kdegraphics4-devel and cmake already installed. I have changed %define major to 2. Can you explain why it has to be changed.
Update: Upping %define major by 1 didn't help. The error remains the same.

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Help needed with first attempt at packaging (Updating DigiKam)
« Reply #9 on: January 28, 2011, 10:27:21 PM »
I gave this another try (even though it was already updated long ago) and managed to get it packaged. Can anybody check my source rpm to see if it is correct? Here it is: http://dl.dropbox.com/u/12727519/digikam-1.7.0-1pclos2010.src.rpm. Maybe then I can move on to packaging other stuff.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Help needed with first attempt at packaging (Updating DigiKam)
« Reply #10 on: January 29, 2011, 12:44:51 AM »
Aradalf,
Compare your spec file to the one in the updated package. This will help you, I believe. It has always helped me.

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Help needed with first attempt at packaging (Updating DigiKam)
« Reply #11 on: January 29, 2011, 09:14:18 AM »
Aradalf,
Compare your spec file to the one in the updated package. This will help you, I believe. It has always helped me.


Well I compared them, and it turned out they were pretty much the same except that I forgot to change the version number of one library. I guess I should get started on updating other packages then.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Help needed with first attempt at packaging (Updating DigiKam)
« Reply #12 on: January 29, 2011, 09:33:52 AM »
Aradalf,
Compare your spec file to the one in the updated package. This will help you, I believe. It has always helped me.


Well I compared them, and it turned out they were pretty much the same except that I forgot to change the version number of one library. I guess I should get started on updating other packages then.

Excellent!

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Help needed with first attempt at packaging (Updating DigiKam)
« Reply #13 on: January 29, 2011, 09:50:15 AM »
Question: Should source files always be converted to tar.xz?

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Help needed with first attempt at packaging (Updating DigiKam)
« Reply #14 on: January 29, 2011, 09:51:55 AM »
Question: Should source files always be converted to tar.xz?

Yes. Unless it is simply impossible.