[newbies] сборка софтинки для BlackBerry

Michael Shigorin mike на osdn.org.ua
Пн Мар 8 07:30:21 UTC 2010


On Sun, Mar 07, 2010 at 12:20:54PM +0300, Maks Re wrote:
> стал учиться упаковывать...

Ба! :)

> вопрос: я пытался собрать поддержку графики, но все уперлось в
> отсутствующую библиотеку (libtar).  к слову про libtar - оно
> собралось со спеком от редхата.

Ну так и отдельным пакетом.

> The following packages have unmet dependencies:
>   libbarry0: Depends: boost but it is not installable

Это не банальный редхатовый Requires: boost в спеке?
Если да -- подлежит выкидыванию, /usr/lib/rpm/find-requires
справится лучше.

> как надо поступить -

А это третий вопрос.

> А) надо сначала оформить пакет с сизиф (libtar), и потом
> пробовать снова собрать софт использующий ее
> Б) "как-то" собирать все вместе (barry & libtar).

Конечно, первое.  Только лучше не "сначала в сизиф",
а сперва добить сборку у себя, потом уже скопом в сизиф
-- можно одним таском (сперва libtar, потом barry),
можно закинуть libtar и при успешном прохождении уже
barry, это вопрос преододения мандража скорее. :)

> в общем, мои творения - на
> http://git.altlinux.org/people/remaks/packages/

Строго говоря, именование патчей не соответствует ALT Packaging:
http://docs.altlinux.org/archive/2.4/master/alt-docs-devel/ch04.html#id2513071
(да, я понимаю, что это саавсем не на вики -- хотя:
http://www.altlinux.org/PatchHowto)

Попытался посмотреть -- libtar явно "сложный" апстрим
(btw в дебиане уже патч с шестым релизом, включает
libtar-1.2.11-missing-protos.patch); какую-либо собираемость
сломал и починить не получается.

На всякий прилагаю спеки -- libtar в процессе зачистки сломал
по сборке, а barry по этой причине и не смог пособирать.
Могу выложить историю зачисток на git.alt, хотя хорошо бы
не захламлять заведомо сломанным -- забуду ж потом прибраться :)

Начинал с rpmcs (ну или хотя бы spec_cleanup).

-- 
 ---- WBR, Michael Shigorin <mike на altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/
----------- следующая часть -----------
Name: libtar
Version: 1.2.11
Release: alt1

Summary: Tar file manipulation API
License: MIT
Group: System/Libraries

Url: http://www.feep.net/libtar/
Source: ftp://ftp.feep.net/pub/software/libtar/libtar-%version.tar.gz
Patch0: http://ftp.debian.org/debian/pool/main/libt/libtar/libtar_1.2.11-4.diff.gz
Patch1: libtar-1.2.11-missing-protos.patch
Patch2: libtar-1.2.11-tar_header.patch
Packager: Maks Re <remaks на altlinux.org>

# Automatically added by buildreq on Tue Mar 02 2010 (-bi)
BuildRequires: gcc-c++ gcc-fortran rpm-build-qt4 zlib-devel

%description
libtar is a C library for manipulating tar archives.
It supports both the strict POSIX tar format
and many of the commonly-used GNU extensions.

%package devel
Summary: Development files for %name
Group: Development/Libraries
Requires: %name = %version-%release

%description devel
The %name-devel package contains libraries and header files
to develop applications that use %name.

%prep
%setup
%patch0 -p1 -z .deb
%patch1 -p1
%patch2 -p1 -z .tar_header
# set correct version for .so build
%define ltversion %(echo %version | tr '.' ':')
sed -i 's/-rpath $(libdir)/-rpath $(libdir) -version-number %ltversion/' \
  lib/Makefile.in

%build
%autoreconf
%configure %{subst_enable static}
# Don't use rpath!
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build

%install
%makeinstall_std
rm %buildroot%_libdir/*.la

%files
%doc COPYRIGHT TODO README ChangeLog*
%_bindir/%name
%_libdir/lib*.so.*

%files devel
%_includedir/libtar.h
%_includedir/libtar_listhash.h
%_libdir/lib*.so
%_man3dir/*.3*

%changelog
* Tue Mar 02 2010 Maks Re <remaks на altlinux.org> 1.2.11-alt1
- Initial build for Sisyphus

* Tue Nov 24 2009 Huzaifa Sidhpurwala <huzaifas на redhat.com> 1.2.11-13
- Version bump so that it builds

* Mon Nov 23 2009 Huzaifa Sidhpurwala <huzaifas на redhat.com> 1.2.11-12
- Fix buffer overflow bug RBZ #538770

* Thu Apr  3 2008 Hans de Goede <j.w.r.degoede на hhs.nl> 1.2.11-11
- Fix missing prototype compiler warnings

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng на fedoraproject.org> - 1.2.11-10
- Autorebuild for GCC 4.3

* Mon Aug 13 2007 Hans de Goede <j.w.r.degoede на hhs.nl> 1.2.11-9
- Update License tag for new Licensing Guidelines compliance

* Mon Aug 28 2006 Hans de Goede <j.w.r.degoede на hhs.nl> 1.2.11-8
- FE6 Rebuild

* Sun Jul 23 2006 Hans de Goede <j.w.r.degoede на hhs.nl> 1.2.11-7
- Taking over as maintainer since Anvil has other priorities
- Add a bunch of patches from Debian, which build a .so instead of a .a
  and fix a bunch of memory leaks.
- Reinstate a proper devel package as we now build a .so

* Thu Mar 16 2006 Dams <anvil[AT]livna.org> - 1.2.11-6.fc5
- Modified URL and added one in Source0

* Sun May 22 2005 Jeremy Katz <katzj на redhat.com> - 1.2.11-5
- rebuild on all arches

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt

* Sat Aug 16 2003 Dams <anvil[AT]livna.org> 0:1.2.11-0.fdr.3
- Merged devel and main packages
- Package provide now libtar-devel

* Tue Jul  8 2003 Dams <anvil[AT]livna.org>
- Initial build.
----------- следующая часть -----------
# always build with GUI
%define with_gui 0
%define with_opensync 0

Name: barry
Version: 0.16
Release: alt1

Summary: BlackBerry(tm) Desktop for Linux
License: GPLv2+
Group: Communications

Url: http://www.netdirect.ca/software/packages/barry
Source: %name-%version.tar.bz2
Patch: barry_alt_fix.patch
Packager: Maks Re <remaks на altlinux.org>

BuildRequires: libusb-devel libusb-compat-devel gcc-c++ pkgconfig boost-devel libfuse-devel zlib-devel

%if %with_gui
BuildRequires: desktop-file-utils
%endif

%define barryroot %_builddir/%name-%version

%description
Barry is a desktop toolset for managing your BlackBerry(tm) device.
(BlackBerry is a registered trademark of Research in Motion Limited.)

%package -n libbarry0
Summary: BlackBerry(tm) Desktop for Linux - shared libraries
Group: Development/Libraries

%description -n libbarry0
Barry is a desktop toolset for managing your BlackBerry(tm) device.

This package contains the library files, license agreement, README file,
and most other assorted documentation common to all sub-packages.
You likely want to also install barry-util and barry-gui.

%package -n libbarry-devel
Summary: BlackBerry(tm) Desktop for Linux - development libraries
Group: Development/Libraries
Requires: libbarry0 libusb-devel libusb-compat-devel boost-devel

%description -n libbarry-devel
Barry is a desktop toolset for managing your BlackBerry(tm) device.

This package contains the development library files for Barry.

%package util
Summary: BlackBerry(tm) Desktop for Linux - utilities
Group: Applications/Productivity
Requires: libbarry0 fuse
Conflicts: barry-bcharge

%description util
Barry is a desktop toolset for managing your BlackBerry(tm) device.

This package contains the commandline tools bcharge, btool,
breset and others which will enable you to charge your device
with a proper 500mA and be able to access the data on the device
in many ways.

%if %with_gui
%package gui
Summary: BlackBerry(tm) Desktop for Linux - graphical interface
Group: Applications/Productivity
#Requires: libbarry0 gtkmm24 libglademm libtar
#BuildRequires: libgtkmm2-devel libglademm-devel libtar-devel
Requires: libbarry0 gtkmm24 libglademm
BuildRequires: libgtkmm2-devel libglademm-devel

%description gui
Barry is a desktop toolset for managing your BlackBerry(tm) device.

This package contains the GUI applications built on top of libbarry.
%endif

%if %with_opensync
%package opensync
Summary: BlackBerry(tm) Desktop for Linux - opensync plugin
Group: Applications/Productivity
Requires: libbarry0, libopensync >= 0.22
BuildRequires: libopensync-devel

%description opensync
Barry is a desktop toolset for managing your BlackBerry(tm) device.

This package contains the opensync plugin.
%endif

%prep
%setup
%patch -p1
%autoreconf

%build
# main tree
%configure --enable-boost --with-zlib
%make

# gui tree
%if %with_gui
pushd gui
%configure PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
%make
popd
%endif

# opensync tree
%if %with_opensync
pushd opensync-plugin
%configure PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
%make
popd
%endif

%install
# main tree
%makeinstall_std

# delete some test-only programs
rm -f %buildroot%_bindir/bdptest
rm -f %buildroot%_bindir/bjvmdebug

# proceed as usual...
mkdir -p %buildroot%_sysconfdir/udev/rules.d
cp -a udev/10-blackberry.rules %buildroot%_sysconfdir/udev/rules.d/
cp -a udev/99-blackberry-perms.rules %buildroot%_sysconfdir/udev/rules.d/
mkdir -p %buildroot%_sysconfdir/modprobe.d
cp -a modprobe/blacklist-berry_charge.conf %buildroot%_sysconfdir/modprobe.d/
mkdir -p %buildroot%_sysconfdir/ppp/peers
cp -a ppp/barry-rogers %buildroot%_sysconfdir/ppp/peers/
cp -a ppp/barry-verizon %buildroot%_sysconfdir/ppp/peers/
cp -a ppp/barry-sprint %buildroot%_sysconfdir/ppp/peers/
cp -a ppp/barry-o2ireland %buildroot%_sysconfdir/ppp/peers/
cp -a ppp/barry-tmobileus %buildroot%_sysconfdir/ppp/peers/
cp -a ppp/barry-att_cingular %buildroot%_sysconfdir/ppp/peers/
cp -a ppp/barry-chinamobile %buildroot%_sysconfdir/ppp/peers/
cp -a ppp/barry-kpn %buildroot%_sysconfdir/ppp/peers/
mkdir -p %buildroot%_sysconfdir/chatscripts
cp -a ppp/barry-rogers.chat %buildroot%_sysconfdir/chatscripts/
cp -a ppp/barry-verizon.chat %buildroot%_sysconfdir/chatscripts/
cp -a ppp/barry-sprint.chat %buildroot%_sysconfdir/chatscripts/
cp -a ppp/barry-o2ireland.chat %buildroot%_sysconfdir/chatscripts/
cp -a ppp/barry-tmobileus.chat %buildroot%_sysconfdir/chatscripts/
cp -a ppp/barry-att_cingular.chat %buildroot%_sysconfdir/chatscripts/
cp -a ppp/barry-chinamobile.chat %buildroot%_sysconfdir/chatscripts/
cp -a ppp/barry-kpn.chat %buildroot%_sysconfdir/chatscripts/

# Install hal fdi config
mkdir -p %buildroot%_datadir/hal/fdi/information/10freedesktop
mkdir -p %buildroot%_datadir/hal/fdi/policy/10osvendor
cp -a hal/fdi/information/10freedesktop/10-blackberry.fdi %buildroot%_datadir/hal/fdi/information/10freedesktop
cp -a hal/fdi/policy/10osvendor/19-blackberry-acl.fdi %buildroot%_datadir/hal/fdi/policy/10osvendor
# Install hal support script
mkdir -p %buildroot%_bindir
cp -a hal/hal-blackberry %buildroot%_bindir
# Install bash completion scripts
mkdir -p %buildroot%_sysconfdir/bash_completion.d
cp -a bash/bjavaloader %buildroot%_sysconfdir/bash_completion.d
cp -a bash/btool %buildroot%_sysconfdir/bash_completion.d

# gui tree
%if %with_gui
cd gui/
%makeinstall_std
# Install barry logo icon
cd ../
mkdir -p %buildroot%_pixmapsdir
cp -a logo/barry_logo_icon.png %buildroot%_pixmapsdir
desktop-file-install \
   --dir %buildroot%_desktopdir \
   rpm/barrybackup.desktop
%endif

# opensync tree
%if %with_opensync
cd opensync-plugin/
%makeinstall_std
cd ../
%endif

%files -n libbarry0
%doc AUTHORS ChangeLog COPYING NEWS README

%files -n libbarry-devel
%doc examples/*.cc examples/*.am
%_includedir/barry/*
%_libdir/*.a
%_pkgconfigdir/*.pc
%doc COPYING TODO doc/*

%files util
%_sbindir/bcharge
%_sbindir/breset
%_sbindir/pppob
%_bindir/btool
%_bindir/bfuse
%_bindir/bjavaloader
%_bindir/bjdwp
%_bindir/bs11nread
%_bindir/bidentify
%_bindir/brecsum
%_bindir/upldif
%_bindir/bktrans
%_bindir/btranslate
%_bindir/brimtrans
%_bindir/hal-blackberry
%_man1dir/btool*
%_man1dir/bfuse*
%_man1dir/bjavaloader*
%_man1dir/bjdwp*
%_man1dir/bs11nread*
%_man1dir/bidentify*
%_man1dir/bcharge*
%_man1dir/pppob*
%_man1dir/brecsum*
%_man1dir/breset*
%_man1dir/upldif*
%_datadir/hal/fdi/information/10freedesktop/10-blackberry.fdi
%_datadir/hal/fdi/policy/10osvendor/19-blackberry-acl.fdi
%attr(0644,root,root) %config %_sysconfdir/udev/rules.d/*
%attr(0644,root,root) %config %_sysconfdir/modprobe.d/blacklist-berry_charge.conf
%attr(0644,root,root) %config %_sysconfdir/ppp/peers/barry-rogers
%attr(0644,root,root) %config %_sysconfdir/ppp/peers/barry-verizon
%attr(0644,root,root) %config %_sysconfdir/ppp/peers/barry-sprint
%attr(0644,root,root) %config %_sysconfdir/ppp/peers/barry-o2ireland
%attr(0644,root,root) %config %_sysconfdir/ppp/peers/barry-tmobileus
%attr(0644,root,root) %config %_sysconfdir/ppp/peers/barry-att_cingular
%attr(0644,root,root) %config %_sysconfdir/ppp/peers/barry-chinamobile
%attr(0644,root,root) %config %_sysconfdir/ppp/peers/barry-kpn
%attr(0640,root,root) %config %_sysconfdir/chatscripts/barry-rogers.chat
%attr(0640,root,root) %config %_sysconfdir/chatscripts/barry-verizon.chat
%attr(0640,root,root) %config %_sysconfdir/chatscripts/barry-sprint.chat
%attr(0640,root,root) %config %_sysconfdir/chatscripts/barry-o2ireland.chat
%attr(0640,root,root) %config %_sysconfdir/chatscripts/barry-tmobileus.chat
%attr(0640,root,root) %config %_sysconfdir/chatscripts/barry-att_cingular.chat
%attr(0640,root,root) %config %_sysconfdir/chatscripts/barry-chinamobile.chat
%attr(0640,root,root) %config %_sysconfdir/chatscripts/barry-kpn.chat
%attr(0640,root,root) %config %_sysconfdir/bash_completion.d/bjavaloader
%attr(0640,root,root) %config %_sysconfdir/bash_completion.d/btool
%doc COPYING
%doc zsh

%if %with_gui
%files gui
%_bindir/barrybackup
%_datadir/barry/glade/*.glade
%_pixmapsdir/barry_logo_icon.png
%_desktopdir/*barrybackup*.desktop
%_man1dir/barrybackup*
%doc COPYING
%endif

%if %with_opensync
%files opensync
%_libdir/opensync/plugins/*
%_datadir/opensync/defaults/*
%doc COPYING
%endif

%post -n libbarry0 -p %post_ldconfig
%postun -n libbarry0 -p %post_ldconfig

%changelog
* Tue Feb 23 2010 Maks Re <remaks на altlinux.org> 0.16-alt1
- initial build for ALT Linux Sisyphus

* Sat Sep 29 2009 Chris Frey <cdfrey на foursquare.net> 0.16-0
- version bump
- added new ppp chat script for KPN Nederland
- using new udev rules set
- added bjdwp and manpage, and removed some test-only programs
- added bash and zsh completion scripts
- added .desktop file and icon for barrybackup

* Fri Apr 10 2009 Chris Frey <cdfrey на foursquare.net> 0.15-0
- version bump
- added HAL FDI scripts
- added bjavaloader and bfuse
- updated for udev directory reorganization in Barry source tree
- added zlib-devel to BuildRequires list
- added brimtrans

* Wed Sep 24 2008 Chris Frey <cdfrey на foursquare.net> 0.14-0
- version bump
- added new ppp chat script for T-Mobile US
- renamed libbarry to libbarry0

* Thu May 29 2008 Chris Frey <cdfrey на foursquare.net> 0.13-1
- version bump
- added brecsum
- added ppp options and chat scripts
- added manpages for pppob, brecsum, breset, upldif, barrybackup
- spec file now assumes gui and opensync, with conditional checks depending on host

* Fri Dec 07 2007 Chris Frey <cdfrey на foursquare.net> 0.12-1
- version bump

* Fri Nov 30 2007 Chris Frey <cdfrey на foursquare.net> 0.11-1
- version bump

* Fri Nov 30 2007 Chris Frey <cdfrey на foursquare.net> 0.10-1
- version bump
- removed ktrans and translate from rpm package
- added bidentify

* Thu Aug 09 2007 Chris Frey <cdfrey на foursquare.net> 0.9-1
- version bump

* Fri Aug 03 2007 Chris Frey <cdfrey на foursquare.net> 0.8-1
- version bump
- changed tarball to bz2

* Tue May 01 2007 Chris Frey <cdfrey на foursquare.net> 0.7-2
- added pppob to utils

* Thu Mar 08 2007 Chris Frey <cdfrey на foursquare.net> 0.7-1
- removed barry base package that only contained docs, and put docs in libbarry*
- changed barrybackup reference to barry-gui
- removed the patch step, as version 0.7 shouldn't need it
- added license file to each package

* Sun Mar 04 2007 Troy Engel <tengel на users.sourceforge.net> 0.6-1
- initial build
- adding udev and console perms patch for raw 0.6



Подробная информация о списке рассылки devel-newbies