Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386473 - net-libs/ntrack - Network connectivity tracking library for desktop applications
Summary: net-libs/ntrack - Network connectivity tracking library for desktop applications
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Default Assignee for New Packages
URL: https://launchpad.net/ntrack
Whiteboard:
Keywords: EBUILD
: 393053 (view as bug list)
Depends on: 453926
Blocks:
  Show dependency tree
 
Reported: 2011-10-08 23:44 UTC by Bartosz Brachaczek
Modified: 2013-02-05 10:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
net-libs/ntrack-016 ebuild file (ntrack-016.ebuild,1.22 KB, text/plain)
2011-12-04 22:15 UTC, Katrina Niolet
Details
ntrack-016.ebuild (ntrack-016.ebuild,1.14 KB, text/plain)
2013-02-05 10:27 UTC, Sergey Popov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bartosz Brachaczek 2011-10-08 23:44:05 UTC
Please create a new ebuild for ntrack. Upstream describes it as `a lightweight and easy to use library for application developers that want to get events on network online status changes such as online, offline or route changes'. >=net-im/kadu-0.10.0 can take advantage of it (it actually has an automagic dependency on ntrack if found). Probably more packages can use it too, I don't know.

There is a working net-libs/ntrack ebuild available in roslin overlay (though it has wrong version number 0.14 instead of upstream 014).
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-12-03 18:47:29 UTC
*** Bug 393053 has been marked as a duplicate of this bug. ***
Comment 2 Katrina Niolet 2011-12-04 22:11:00 UTC
Current upstream is 016, there is an ebuild at https://bugs.gentoo.org/show_bug.cgi?id=393053 which may or may not be better or worse than the one i the roslin overlay (didn't check)
Comment 3 Katrina Niolet 2011-12-04 22:15:07 UTC
ok looking at the one in the roslin overlay its lacking options to build some of the features (such as the python bindings). I'm attaching the ebuild I made for 016 to this bug.
Comment 4 Katrina Niolet 2011-12-04 22:15:33 UTC
Created attachment 294795 [details]
net-libs/ntrack-016 ebuild file
Comment 5 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-01-26 02:24:57 UTC
Thank you for contributing an ebuild; here is some constructive advice to make your ebuild writing easier towards the future, as well as some minor corrections:

1) You can append the ebuild header from `head -n 3 /usr/portage/skel.ebuild`.
2) EAPI 5 is available, see link [2] at the bottom of this comment for more info.
3) Keywords should be unstable (KEYWORDS="~amd64 ~x86") until stabilization.
4) MIN_QT_VERSION makes it harder since you can just adjust the dependency.
5) You might miss dependencies, see bug #453926. Also, you might want to check whether certain USE flags need to be enabled for the package to work.
6) Use query functions [1] which can make src_configure much shorter, you don't need the "die" for ebuild helpers in EAPI>=4 since it introduces "utilities die on their own, unless the nonfatal command is used" as you can see in [2]; here is an example:

> src_configure() {
>     econf \
>         $(use_with pygobject) \
>         $(use_enable developerbuild developer-build) \
>         $(use_with qt qt4) \
>         $(use_with glib glib2)
> }

If you somehow explicitly need the yes and no, you could use the new usex from EAPI=5, see "New usex helper function" near the bottom of [2].

7) You can call the default src_install and you don't need "die" here either.

> src_install() {
>     default
>     dodoc README ChangeLog NEWS
> }

With kind regards.

PS: If you want, you can let us know through this bug if you want to become a proxy maintainer [3, chapter 6] for this package.

[1]: http://devmanual.gentoo.org/function-reference/query-functions
[2]: http://devmanual.gentoo.org/ebuild-writing/eapi
[3]: http://www.gentoo.org/proj/en/qa/proxy-maintainers/#doc_chap6
Comment 6 Sergey Popov gentoo-dev 2013-02-05 10:27:01 UTC
Created attachment 337990 [details]
ntrack-016.ebuild

Slightly reworked ebuild for ntrack:

- EAPI 5, autotools-utils eclass
- Use flag reorganizing
- Add missing optional run-time dependency on libnl and build-time dependency on pkgconfig
- Correct license
- drop -Werror from CFLAGS
- developer build enabled by default, cause it's probably needed for correct tests passing

Known issues:

- USE=python is broken

Those changes was partly done as suggested by Tom Wijsman