Author Topic: [PACKAGED] Lookat : a program to view Un*x text files and man pages - Is it OK ?  (Read 511 times)

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
SPEC : http://dl.dropbox.com/u/37931428/Lookat/pclos-lookat_bekijk.spec
BUILDLOG : http://dl.dropbox.com/u/37931428/Lookat/pclos-lookat_bekijk.spec.log
SRPM : http://dl.dropbox.com/u/37931428/Lookat/lookat_bekijk-1.4.2-1slingshot2012.src.rpm
RPM : http://dl.dropbox.com/u/37931428/Lookat/lookat_bekijk-1.4.2-1slingshot2012.i586.rpm

----------------------

Just packaged Lookat : a program to view Un*x text files and man pages.
Please comment.
NOTE : There was already a .spec file within the source. I have just modified it.

  • There was Requires:   ncurses-libs    in the original .spec. After searching Synaptic, I changed it to libncurses5
  • Is this necessary in full or just configure is enough? ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
  • What is this make %{?_smp_mflags}
--------------------------

What is "lookat"?

"lookat" (or "bekijk" in the Dutch version) is a program to view Un*x text files and manual pages.
History

Under DOS I used list.com to view text files. I didn't find such a program under my favorite OS, GNU/Linux. The standard Un*x utilities (more, less, view ...) weren't userfriendly enough. For this reason I have made "lookat".
License

Like the most programs under Linux is "lookat" Free :-)) and is the source available. "lookat" is published under the GNU General Public License.

-------------------------

« Last Edit: December 16, 2012, 11:31:14 AM by sling-shot »
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1164
hi sling-shot,

Quote
There was Requires:   ncurses-libs    in the original .spec. After searching Synaptic, I changed it to libncurses5

Adding ncurses-devel to buildrequires is ok
addind libncurses5 to requires is not necessary this should be detected automatically by the build system.
please remove the requires libncurses5 also to prevent later update trouble.

Quote
Is this necessary in full or just configure is enough? ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man

the %configure macro is preferred it sets also the variables from the whole line. so remove the line ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man from the spec file.

Quote
What is this make %{?_smp_mflags}
That's a kind of alternative to the %make macro. the %{?_smp_mflags} macro adds also a "-jx" to speed up the
build process. That's ok so.

Quote
make install DESTDIR=$RPM_BUILD_ROOT

that's ok so but i personally prefer the %makeinstall_std macro that's shorter ;D

regards
ghostbunny
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Adding ncurses-devel to buildrequires is ok
addind libncurses5 to requires is not necessary this should be detected automatically by the build system.
please remove the requires libncurses5 also to prevent later update trouble.

Without Requires: libncurses5 the package is NOT INSTALLABLE in my test system. It complains about ncurses.
So what to do?
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1164
i have no problems to install it after building from this modified spec

Code: [Select]
Name: lookat_bekijk
Version: 1.4.2
Release: %mkrel 1
Summary: Lookat / bekijk is a program to view Un*x text files and man pages.
Group: Applications/Text
License: GPLv2+
URL: http://www.wagemakers.be/english/programs/lookat
Source0: lookat_bekijk-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: gcc, ncurses-devel


%description
"lookat"  (or  "bekijk" in the Dutch version) is a program to view Un*x text files and manual pages.

Under DOS I used list.com to view text files. I didn't find such a program under my favorite OS, GNU/Linux.
The standard Un*x utilities ( more, less, view ...) weren't userfriendly enough. For this reason I created "lookat".

%prep
%setup -q
#./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man

%build
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
/usr/bin/lookat
/usr/bin/bekijk
%doc /usr/share/doc/lookat/README
%doc /usr/share/doc/lookat/examples/blue_config.cfg
%doc /usr/share/man/man1/bekijk.1.bz2
%doc /usr/share/man/man1/lookat.1.bz2
%doc /usr/share/doc/lookat/LEESMIJ
%config /etc/lookat.conf
%config /etc/lookat.conf.default

%changelog
* Sat Dec 15 2012 Sling Shot <sling-shot at lycos.com> 1.4.2-1slingshot2012
- Initial build.

a default system should also contain libncurses or am i wrong?
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
Without Requires: libncurses5 the package is NOT INSTALLABLE in my test system. It complains about ncurses.
So what to do?

It does not need Requires: libncurses5.
If you look at the build log you will see when it does the find-requires it generates a dependency on libncurses.so.5 which is provided by package libncurses5.

Quote
Requires: libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.3.4) libc.so.6(GLIBC_2.4) libc.so.6(GLIBC_2.7) libncurses.so.5 rtld(GNU_HASH)

So that dependency is already handled. You said in your OP that it originally had a Requires: ncurses-libs.   That would cause an error because no package in our repo provides that capability.
 
When reporting errors please give us the actual error.

Terry.
« Last Edit: December 16, 2012, 09:40:58 AM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Sorry. I had actually forgotten the error.

Synaptic throws this error when Requires: ncurses-libs or Requires: libncurses is present.
However, I did not see this error if I used Requires: libncurses5 (which is listed in Synaptic)

The actual error is shown in a pop-up window titled "Could not mark all packages for installation or upgrade" and subheaded "The following packages have unresolvable dependencies. Make sure that all required repositories are added and enabled in the preferences."
Code: [Select]
lookat_bekijk:
 Depends: ncurses-libs but is not installable.

Similar error came up for Requires: libncurses too.

Now for the happy ending :)

Removing the Requires altogether makes the error go away.

LESSON:
Whatever is autogenerated by Find-requires need not be explicitly stated ??????
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
Synaptic throws this error when Requires: ncurses-libs or Requires: libncurses is present.
However, I did not see this error if I used Requires: libncurses5 (which is listed in Synaptic)

That is because there is no package in the repo that provides a capability called ncurses-libs or libncurses

Code: [Select]
[terry@dell ~]$ apt-cache whatprovides ncurses-libs libncurses
<ncurses-libs>
  nothing provides <ncurses-libs>
<libncurses>
  nothing provides <libncurses>

Package libncurses5 does provide a capability called libncurses5 (packages provide their own name as a capability) as well as others:

Code: [Select]
terry@dell ~]$ rpm -q --provides libncurses5
libform.so.5  
libmenu.so.5  
libncurses.so.5  
libpanel.so.5  
libncurses5 = 5.9-1pclos2011
 

LESSON:
Whatever is autogenerated by Find-requires need not be explicitly stated ??????

You should not add unnecessary Requires to SPEC files as it will often lead to trouble with updates in the future.

Terry.
« Last Edit: December 16, 2012, 10:22:19 AM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
So right now this package is good to go?
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
So right now this package is good to go?

The SRPM I just downloaded still has the unnecessary Requires and a spurious ./configure command in the %prep section (read what GB said in reply #1). The configure should be done in the %build section.

On a more minor point I would have thought it would be better placed in "Text tools" section of Synaptic rather than "Applications/Text" as we don't currently have anything there.

Terry.
« Last Edit: December 16, 2012, 11:03:27 AM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Updated. Please check back.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.

On a more minor point I would have thought it would be better placed in "Text tools" section of Synaptic rather than "Applications/Text" as we don't currently have anything there.

Terry.

Will that space in between Text and tools cause any problem? Should I place them in quotes like "Text tools"?

(This is not yet updated in the .spec file)
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
Will that space in between Text and tools cause any problem? Should I place them in quotes like "Text tools"?

It doesn't need quotes (but it must match the existing section). You can test this quite easily yourself  ;)

Terry
« Last Edit: December 16, 2012, 11:28:00 AM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Done that change to Text tools and updated DropBox accordingly.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1164
looks good to go for me.

tip for the next package.

don't do the lines in the %description section so long. this lines will be appear exactly so written in the synaptic description which will cause a scroll bar and the play with the mouse if you want to read (i just mean horizontal scroll) the full description.
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
May be I shall adjust the hard line breaks to a horizontal resolution of 1024 then? (or should I go evevn lower for 800?)
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6