debian/0000755000000000000000000000000012162352204007163 5ustar debian/source/0000755000000000000000000000000012162352204010463 5ustar debian/source/format0000644000000000000000000000001412162352204011671 0ustar 3.0 (quilt) debian/control0000644000000000000000000000150012162352204010562 0ustar Source: gkrellm-gkrellmpc Section: sound Priority: optional Maintainer: mpd maintainers Uploaders: Andrey Rahmatullin Build-Depends: debhelper (>= 9), libcurl4-gnutls-dev, gkrellm (>= 2.0.0), libgtk2.0-dev, pkg-config Standards-Version: 3.9.4 Homepage: http://mpd.wikia.com/wiki/Client:GKrellMPC Vcs-Git: git://anonscm.debian.org/pkg-mpd/gkrellm-gkrellmpc.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-mpd/gkrellm-gkrellmpc.git;a=summary Package: gkrellm-gkrellmpc Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, gkrellm (>= 2.0.0) Description: GKrellM plugin for controlling MPD This GKrellM plugin works as a client for Music Player Daemon (MPD). It shows the current song and allows one to control the playback and change the playlist. debian/compat0000644000000000000000000000000212162352204010361 0ustar 9 debian/rules0000755000000000000000000000033312162352204010242 0ustar #!/usr/bin/make -f export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed %: dh $@ override_dh_auto_build: dh_auto_build -- enable_nls=1 override_dh_auto_install: dh_auto_install -- enable_nls=1 override_dh_auto_test: debian/patches/0000755000000000000000000000000012162352204010612 5ustar debian/patches/fix-fd-leak.patch0000644000000000000000000000174512162352204013731 0ustar Description: Fix the fd leak in mpc_mpd_connect() Author: Andrey Rahmatullin Origin: vendor, http://git.altlinux.org/people/wrar/packages/gkrellm-gkrellmpc.git?f=gkrellmpc-0.1_beta10-alt-fd-leak-fix.patch;h=0706caae Last-Update: 2010-12-18 --- a/mpd.c +++ b/mpd.c @@ -37,7 +37,10 @@ } if ((sockfd = socket(PF_INET, SOCK_STREAM, 0)) == -1) return(FALSE); - if (!(server = gethostbyname(mpc_conf_hostname))) return(FALSE); + if (!(server = gethostbyname(mpc_conf_hostname))) { + close(sockfd); + return(FALSE); + } bzero((char *) &serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; @@ -46,7 +49,10 @@ server->h_length); serv_addr.sin_port = htons(mpc_conf_port); - if (connect(sockfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) return(FALSE); + if (connect(sockfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) { + close(sockfd); + return(FALSE); + } /* Getup the mpd object */ mpc_mpd = g_io_channel_unix_new(sockfd); debian/patches/fix-makefile-install.patch0000644000000000000000000000173412162352204015645 0ustar Description: Fix install makefile targets Author: Andrey Rahmatullin Last-Update: 2010-12-18 --- a/Makefile +++ b/Makefile @@ -45,10 +45,8 @@ rm -rf dist install: gkrellmpc.so - if [ -d /usr/lib/gkrellm2/plugins/ -a -w /usr/lib/gkrellm2/plugins/ ]; then make install_lib; elif [ -d /usr/local/lib/gkrellm2/plugins/ -a -d /usr/local/lib/gkrellm2/plugins/ ]; then make install_local_lib; elif [ -d ~/.gkrellm2/plugins/ -a -w ~/.gkrellm2/plugins/ ]; then make install_home; else make install_instructions; fi - -install_lib: gkrellmpc.so - cp gkrellmpc.so /usr/lib/gkrellm2/plugins/ + mkdir -p $(DESTDIR)/usr/lib/gkrellm2/plugins/ + cp gkrellmpc.so $(DESTDIR)/usr/lib/gkrellm2/plugins/ ifeq ($(enable_nls),1) (cd po && ${MAKE} install) endif --- a/po/Makefile +++ b/po/Makefile @@ -6,7 +6,7 @@ FILES_MO:=$(FILES_PO:.po=.mo) PREFIX ?= "/usr/share" -LOCALEDIR ?= $(PREFIX)/locale +LOCALEDIR ?= $(DESTDIR)$(PREFIX)/locale PKGNAME ?= gkrellmpc .PHONY: install debian/patches/series0000644000000000000000000000013112162352204012022 0ustar fix-makefile-install.patch fix-makefile-flags.patch fix-fd-leak.patch fix-memleaks.patch debian/patches/fix-memleaks.patch0000644000000000000000000000170412162352204014217 0ustar Description: Fix memory leaks in mpc_mpd_get() Author: Andrey Rahmatullin Origin: vendor, http://git.altlinux.org/people/wrar/packages/gkrellm-gkrellmpc.git?f=gkrellmpc-0.1_beta10-alt-memleaks-fixes.patch;h=0c9b7d5b Last-Update: 2010-12-18 --- a/mpd.c +++ b/mpd.c @@ -153,7 +153,7 @@ * Note that all key names coming back from MPD are lowercased for consistency before being shoved in the hash */ GHashTable * mpc_mpd_get(gchar * command) { - gchar *line; + gchar *line = NULL; gchar **parts; GHashTable *retval = NULL; gboolean success = TRUE; @@ -169,6 +169,7 @@ retval = g_hash_table_new_full(g_str_hash, g_str_equal, free, free); while (1) { + g_free(line); status = g_io_channel_read_line(mpc_mpd, &line, NULL, NULL, NULL); if (status != G_IO_STATUS_NORMAL) { /* Reading failed */ @@ -199,6 +200,8 @@ } } + g_free(line); + if (!success) { g_hash_table_destroy(retval); retval = NULL; debian/patches/fix-makefile-flags.patch0000644000000000000000000000163112162352204015267 0ustar Description: Fix using *FLAGS in the Makefile, add gtk+-2.0 libs to LIBS Author: Andrey Rahmatullin Last-Update: 2013-06-25 --- a/Makefile +++ b/Makefile @@ -11,20 +11,20 @@ CFLAGS += -Wall -fPIC `pkg-config gtk+-2.0 --cflags` -DPACKAGE="\"gkrellmpc\"" ifeq ($(enable_nls),1) CFLAGS += -DENABLE_NLS endif -LDFLAGS += `curl-config --libs` +LIBS += `pkg-config gtk+-2.0 --libs` `curl-config --libs` .PHONY: all clean dist install install_lib install_local_lib install_home install_instructions deinstall uninstall test strip all: gkrellmpc.so gkrellmpc.so: $(OBJECTS) - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o gkrellmpc.so $(OBJECTS) + $(CC) $(LDFLAGS) -shared -o gkrellmpc.so $(OBJECTS) $(LIBS) ifeq ($(enable_nls),1) (cd po && ${MAKE} all) endif %.o: %.c %.h globals.h - $(CC) $(CFLAGS) -c -o $@ $< + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< strip: gkrellmpc.so strip gkrellmpc.so debian/watch0000644000000000000000000000027112162352204010214 0ustar version=3 opts=uversionmangle=s/_/~/ \ http://mina.naguib.ca/dist/gkrellmpc-(.*).tar.gz # http://mpd.wikia.com/wiki/Client:GKrellMPC http://mina.naguib.ca/dist/gkrellmpc-(.*).tar.gz debian/docs0000644000000000000000000000001312162352204010030 0ustar README.txt debian/copyright0000644000000000000000000000233112162352204011115 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: GKrellMPC Upstream-Contact: Mina Naguib Source: http://mpd.wikia.com/wiki/Client:GKrellMPC Files: * Copyright: 2004-2005, Mina Naguib License: GPL-2 Files: po/ru.po Copyright: 2005, Sergey Pinaev License: GPL-2 Files: debian/* Copyright: 2010-2013, Andrey Rahmatullin License: GPL-2 License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. debian/gbp.conf0000644000000000000000000000003612162352204010601 0ustar [DEFAULT] pristine-tar = True debian/changelog0000644000000000000000000000162412162352204011040 0ustar gkrellm-gkrellmpc (0.1~beta10-3) unstable; urgency=low * Bump debhelper compat level to 9 * Bump Standards-Version to 3.9.4 (no change needed) * Add debian/watch * Use canonical anonscm.d.o URLs in the Vcs-* control fields * Update debian/copyright format URL and copyright years * Use DEB_LDFLAGS_MAINT_APPEND instead of exporting LDFLAGS in rules * Use LIBS, LDFLAGS and CPPFLAGS in the Makefile properly -- Andrey Rahmatullin Tue, 25 Jun 2013 23:31:51 +0600 gkrellm-gkrellmpc (0.1~beta10-2) unstable; urgency=low * Upload to unstable * Change maintainer to pkg-mpd team * Bump Standards-Version to 3.9.2 (no change needed) -- Andrey Rahmatullin Sat, 16 Jul 2011 01:03:21 +0600 gkrellm-gkrellmpc (0.1~beta10-1) experimental; urgency=low * Initial release (Closes: #607445) -- Andrey Rahmatullin Tue, 21 Dec 2010 22:20:22 +0500