Author Topic: Kildclient Spec File assistance Requested - please!?  (Read 593 times)

Offline highvoltage

  • Jr. Member
  • **
  • Posts: 30
Kildclient Spec File assistance Requested - please!?
« on: January 08, 2011, 05:39:51 PM »
Hi all,

I am finally making an initial attempt at creating a PCLOS RPM.  I have compiled and ran previous versions of this program on OpenSuse 10.x and 11.x before.  However, I have never created an RPM or compiled this on PCLinuxOS.

I was able to download Kildclient 2.10.0 from sourceforge.  I did not mess around with the latest source from svn.  I was unable to locate any SRPM's for 2.10.0 anywhere on the links posted on this web board, or my old stomping grounds with OpenSuse.  There was a fedora spec file though with the source code I started with.

I have an install of PCLOS MiniMe 2010.12 on my Athlon 64 3000+ with 2 Gigs of ram, and a tiny 40 Gig HD.  This system definitely has enough to be a build system.
I am also currently following http://nbrks.com/rpm/Build_RPMs.odt as my guide to this endeavor.

Some of the suggestions in this document do not work for the spec file.  So, I am using a mix between the original Spec file for Fedora, studying a PCLOS SRPM for Xchat 2.8.8 and the Build_RPMs.odt document.  I am confident why "things" are not working is due to my lack of knowledge with RPM packaging.  Yes - there is definitely much room for error (I do know some C and C++ though, had to take classes in it for my degree).

While I am sure there are more errors than I know about at this time, I am currently getting an error that I believe is with the C code itself in the source.  I am also attaching my initial attempt at a modified Spec File and the Fedora spec file for critique; if someone has time.  Please be kind, I know it's not up to par, LOL.  I would rather learn it properly though and acquire better understanding with good "PCLinuxOS habbits".  Always easier to learn correctly, than re-learn . . .

Any Suggestions/help/Guidance if the time is available?  Hold the blanket party for the time being . . .   ;D

Source download can be found @ http://kildclient.sourceforge.net/phpwebsite/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=2

Error's on RPM Build
Code: [Select]
wind-tables -MT worldselector.o -MD -MP -MF .deps/worldselector.Tpo -c -o worldselector.o worldselector.c
worldselector.c: In function ‘get_world_from_cmdline’:
worldselector.c:521: error: format not a string literal and no format arguments
worldselector.c: In function ‘disconnected_msgbox’:
worldselector.c:810: error: format not a string literal and no format arguments
make[2]: *** [worldselector.o] Error 1
make[2]: Leaving directory `/home/highvoltage/src/rpm/BUILD/kildclient-2.10.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/highvoltage/src/rpm/BUILD/kildclient-2.10.0'
make: *** [all] Error 2
error: Bad exit status from /home/highvoltage/src/tmp/rpm-tmp.68001 (%build)


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

Original Fedora Spec File minus the Change-log to make this a wee bit shorter
Code: [Select]
Name:      kildclient
Version:   2.10.0
Release:   1%{dist}
Summary:   A powerful MUD client with a built-in Perl interpreter
Summary(pt_BR): Um poderoso cliente de MUD com um interpretador Perl embutido
License:   GPLv2+
Group:     Amusements/Games
Icon:      kildclient.xpm
URL:       http://kildclient.sourceforge.net

Source:    http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: glib2-devel >= 2.14.0
BuildRequires: gtk2-devel >= 2.18.0
BuildRequires: gtkspell-devel >= 2.0.0
BuildRequires: gnutls-devel >= 1.0.0
BuildRequires: perl-devel >= 5.8.3
BuildRequires: zlib-devel
BuildRequires: gettext >= 0.14.5
BuildRequires: desktop-file-utils


%description
KildClient is a MUD Client written with the GTK+ windowing toolkit. It
supports many common features of other clients, such as triggers,
gags, aliases, macros, timers, and much more. But its main feature is
the built-in Perl interpreter. You can at any moment execute Perl
statements and functions to do things much more powerful than simply
sending text the mud. Perl statements can also be run, for example, as
the action of a trigger, allowing you to do complex things. Some
built-in functions of KildClient allow interaction with the world,
such as sending commands to it.

KildClient's ANSI support is extensive: it supports not only the
common 16 colors, but also support underlined text (singly and
doubly), text in italics, text striked through, reverse video and
"hidden" text. It also supports vt100's line-drawing characters, and
xterm's escape sequences for a 256-color mode. All these features make
KildClient one of the clients with the most features for displaying
the mud output.

KildClient supports the MCCP (Mud Client Compression Protocol)
protocol, versions 1 and 2, to reduce the necessary bandwidth.

KildClient allows connection through SOCKS4/5 proxy servers.

%description -l pt_BR
KildClient é um cliente de MUD escrito com a biblioteca gráfica GTK.
Ele suporta muitos recursos comuns aos outros clientes, como triggers,
gags, aliases, macros, temporizadores e muito mais. Mas seu principal
recurso é um interpretador Perl embutido. A qualquer momento, você
pode executar declarações Perl e funções para fazer coisas muito mais
poderosas que simplesmente enviar texto para o MUD. Declarações Perl
podem também ser executadas, por exemplo, como ação de um trigger, lhe
permitindo fazer coisas mais complexas. Algumas funções nativas do
KildClient permitem interação com o mundo, como enviar comandos para
ele.

O suporte ANSI do KildClient é extenso: ele suporta não apenas as 16
cores comuns, mas também suporta texto sublinhado (simples e duplo),
texto em itálico, texto tachado, texto em vídeo reverso e texto
"escondido". Ele suporta os caracteres para desenho de linhas do
vt100, e as seqüências do xterm para um mode com 256 cores. Todos
esses recursos fazem o KildClient um dos cliente com mais recursos
para mostrar o texto do mud.

O KildClient suporta o protocolo MCCP (Mud Client Compression
Protocol, Protocolo de Compressão para Clientes de MUD), versões 1 e
2, para reduzir a banda necessária.

O KildClient suporta conexão através de servidores proxy SOCKS4/5.


%prep
%setup -q

%build
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
%find_lang %{name}
desktop-file-install --vendor "fedora" --delete-original \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications          \
  $RPM_BUILD_ROOT%{_datadir}/applications/kildclient.desktop

%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-, root, root, -)
%{_bindir}/kildclient
%doc %{_datadir}/doc/%{name}
%{_mandir}/man1/kildclient.*
%{_datadir}/%{name}
%{_datadir}/pixmaps/kildclient.png
%{_datadir}/pixmaps/kildclient.xpm
%{_datadir}/applications/fedora-kildclient.desktop

Attempt to Modify Spec file for PCLinuxOS minus Changelog
Code: [Select]
%define name kildclient
%define version 2.10.0
%define release %mkrel 1
%define main_summary A powerful MUD client with a built-in Perl interpreter

Name: %name
Version: %version
Release: %release
Summary: %{main_summary}
Group: Applications/Internet
License: GPLv2+
URL: http://download.sourceforge.net/
Source: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
BuildRoot: %_tmppath/%name-%version-%version-buildroot

BuildRequires: libglib2.0_0-devel >= 2.14.0
BuildRequires: libgtk+2.0_0-devel >= 2.18.0
BuildRequires: libgtk+2.0
BuildRequires: libgtkspell-devel >= 2.0.0
BuildRequires: libgnutls-devel >= 1.0.0
BuildRequires: perl-devel >= 5.8.3
BuildRequires: zlib1-devel
BuildRequires: gettext >= 0.14.5
BuildRequires: desktop-file-utils

Requires: gtk+2.0 >= 2.18.0
Requires: libgtk+2.0_0 >= 2.18.0
Requires: gtkspell >= 2.0.0
Requires: libgtkspell0 >= 2.0.0

%description
KildClient is a MUD Client written with the GTK+ windowing toolkit. It
supports many common features of other clients, such as triggers,
gags, aliases, macros, timers, and much more. But its main feature is
the built-in Perl interpreter. You can at any moment execute Perl
statements and functions to do things much more powerful than simply
sending text the mud. Perl statements can also be run, for example, as
the action of a trigger, allowing you to do complex things. Some
built-in functions of KildClient allow interaction with the world,
such as sending commands to it.

KildClient's ANSI support is extensive: it supports not only the
common 16 colors, but also support underlined text (singly and
doubly), text in italics, text striked through, reverse video and
"hidden" text. It also supports vt100's line-drawing characters, and
xterm's escape sequences for a 256-color mode. All these features make
KildClient one of the clients with the most features for displaying
the mud output.

KildClient supports the MCCP (Mud Client Compression Protocol)
protocol, versions 1 and 2, to reduce the necessary bandwidth.

KildClient allows connection through SOCKS4/5 proxy servers.

%prep
%setup -q

%build
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall_std
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files -f %{name}.lang
%defattr(-, root, root, -)
%{_bindir}/kildclient
%doc %{_datadir}/doc/%{name}
%{_mandir}/man1/kildclient.*
%{_datadir}/%{name}
%{_datadir}/pixmaps/kildclient.png
%{_datadir}/pixmaps/kildclient.xpm
%{_datadir}/applications/PCLinuxOS-kildclient.desktop
« Last Edit: January 08, 2011, 05:42:32 PM by highvoltage »
Registered Linux User #527697 http://counter.li.org/

landgraf

  • Guest
Re: Kildclient Spec File assistance Requested - please!?
« Reply #1 on: January 11, 2011, 07:06:07 AM »
Please check this FAQ:
http://wiki.mandriva.com/en/Development/Packaging/Problems

this is Mandriva/PCLOS specific issues

Offline clarms

  • Full Member
  • ***
  • Posts: 72
Re: Kildclient Spec File assistance Requested - please!?
« Reply #2 on: January 13, 2011, 06:11:08 PM »
Does it build manually? Will it build on the command line with the following?
Code: [Select]
./configure --prefix=/usr
make

If it does, then the %configure macro is somehow not working with the code,
which happens at times for some reason.

Offline highvoltage

  • Jr. Member
  • **
  • Posts: 30
Re: Kildclient Spec File assistance Requested - please!?
« Reply #3 on: January 26, 2011, 06:55:16 PM »
My only question/issue is wouldn't building manually throw off the Need to know dependencies in case one is forgotten.  I know on opensuse a clean system, from the DVD base was needed so these issues were avoided.  I am worried about the dependencies to place in the spec file for a "new" install..  I would think that the RPM would build then on my system, but maybe not someone else's.

I have not attempted a manual build on PCLOS yet.  last time I built this on PCLOS was with 2009, and on opensuse 11.3.

Registered Linux User #527697 http://counter.li.org/

Offline clarms

  • Full Member
  • ***
  • Posts: 72
Re: Kildclient Spec File assistance Requested - please!?
« Reply #4 on: January 29, 2011, 06:22:36 AM »
My only question/issue is wouldn't building manually throw off the Need to know dependencies in case one is forgotten.  I know on opensuse a clean system, from the DVD base was needed so these issues were avoided.  I am worried about the dependencies to place in the spec file for a "new" install..  I would think that the RPM would build then on my system, but maybe not someone else's.

I have not attempted a manual build on PCLOS yet.  last time I built this on PCLOS was with 2009, and on opensuse 11.3.

The manual build is a test to make sure the system can compile the program.
If it does make it through with no build errors, then that same command can be
put in the rpm spec file to replace the %configure macro.

For whatever reason, this happens a lot, and it's not pclos thing. This goes back many
years and with other distros. There is something in one of the %configure macros that
does not work with certain configure setups. There seems to be some incompatibility in
these macros and some developer's code.

The dependency part is related to what is placed in the spec file, and
not by the configure line.
« Last Edit: January 29, 2011, 06:42:12 AM by clarms »