debian/0000775000000000000000000000000012265626055007201 5ustar debian/rules0000775000000000000000000000332412265626006010257 0ustar #!/usr/bin/make -f DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so #version=`ls src/.libs/lib*.so.* | \ # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` #major=`ls src/.libs/lib*.so.* | \ # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` config.status: configure dh_testdir dh_autoreconf CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-examples --with-libusb build: build-stamp build-stamp: config.status dh_testdir $(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean dh_autoreconf_clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp rm $(CURDIR)/debian/tmp/usr/bin/simple mv $(CURDIR)/debian/tmp/usr/bin/ifpline $(CURDIR)/debian/tmp/usr/bin/ifp binary-arch: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_installdocs dh_installexamples dh_install --sourcedir=debian/tmp dh_installman dh_link dh_strip dh_compress dh_fixperms dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install debian/watch0000664000000000000000000000007511550206331010217 0ustar version=3 http://sf.net/ifp-driver/libifp-([\d.]+)\.tar\.gz debian/changelog0000664000000000000000000000520012265626051011044 0ustar libifp (1.0.0.2-5ubuntu1) trusty; urgency=medium * Use dh-autoreconf instead of autotools-dev to also fix FTBFS on ppc64el by getting new libtool macros (still updates config.{sub,guess}). -- Logan Rosen Wed, 15 Jan 2014 19:47:13 -0500 libifp (1.0.0.2-5) unstable; urgency=low * QA upload. * source format 3.0 (quilt) * debian/libifp-dev.install: do not install *.la files (closes: #621655) * Add dependencies on ${misc:Depends} * Add build-dependency on autotools-dev, always copy in config.{sub,guess} since the ones provided in the tarball are outdated. * Install manpage via debian/ifp-line-libifp.manpages, some simplifications in debian/rules. -- Ralf Treinen Sun, 10 Apr 2011 08:44:00 +0200 libifp (1.0.0.2-4) unstable; urgency=low * QA upload. + Set maintainer to Debian QA Group . * Move Section: libs from libifp to source package stanza. * Add Homepage field. * Add watch file. * Make clean not ignore errors. * Replace deprecated Source-Version depends with binary:Version. * Copy in config.{guess,sub} on configure, rm them on clean. * Bump Standards Version to 3.8.3. (No changes needed). -- Barry deFreese Mon, 19 Oct 2009 16:15:53 -0400 libifp (1.0.0.2-3) unstable; urgency=low * README.Debian: plugdev, not pmp-common. (Closes: #355051) * debian/control: Standards-Version 3.7.2. -- Joe Wreschnig Tue, 30 May 2006 14:47:26 -0500 libifp (1.0.0.2-2) unstable; urgency=low * Remove pmp-common from recommends. * Switched to debhelper compatibility level 5. -- Joe Wreschnig Thu, 05 Jan 2006 15:25:10 -0600 libifp (1.0.0.2-1) unstable; urgency=low * New upstream version. (Closes: #340244) * Pass --with-libusb to ./configure. * Patch examples/ifpline.c to support df -h. (See: #318624) * src/comp.c (ifp_selftest): Directory listing failure is a warning, not an error. (Closes: #331568) * Provide/Conflict/Replace ifp-line (since it is removed). * Standards-Version 3.6.2. -- Joe Wreschnig Fri, 14 Oct 2005 21:09:17 -0500 libifp (1.0.0.1-2) unstable; urgency=low * Check --help before opening the device. (Closes: #308811) * libifp-dev: Recommend libusb-dev. -- Joe Wreschnig Thu, 12 May 2005 17:31:46 -0500 libifp (1.0.0.1-1) unstable; urgency=low * New upstream release. -- Joe Wreschnig Sun, 20 Feb 2005 15:02:43 -0600 libifp (1.0.0.0-1) unstable; urgency=low * Initial Release. (Closes: #285705) -- Joe Wreschnig Tue, 14 Dec 2004 20:33:15 -0600 debian/libifp4.docs0000664000000000000000000000001411550206331011362 0ustar README TODO debian/libifp4.dirs0000664000000000000000000000001011550206331011367 0ustar usr/lib debian/ifp-line-libifp.dirs0000664000000000000000000000003311550206331013011 0ustar usr/bin usr/share/man/man1 debian/compat0000664000000000000000000000000211550206331010362 0ustar 5 debian/ifp-line-libifp.manpages0000664000000000000000000000001511550247427013656 0ustar debian/ifp.1 debian/copyright0000664000000000000000000000111511550206331011115 0ustar This package was debianized by piman on Tue, 14 Dec 2004 20:33:15 -0600. It was downloaded from http://ifp-driver.sourceforge.net/libifp/ Upstream Author: Geoff Oakham Copyright: Copyright (C) Geoff Oakham, 2004; This driver is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; only version 2 of the License. On Debian systems you can find the GNU GPL version 2 in /usr/share/common-licenses/GPL-2. debian/libifp-dev.dirs0000664000000000000000000000004711550206331012071 0ustar usr/lib usr/include usr/share/man/man3 debian/source/0000775000000000000000000000000011550245757010503 5ustar debian/source/format0000664000000000000000000000001411550245766011711 0ustar 3.0 (quilt) debian/ifp-line-libifp.README.Debian0000664000000000000000000000431111550206331014171 0ustar ifp-line for Debian ------------------- 1. What are "UMS" and "Manager" mode? Why would I want Manager mode? There are two ways to access iFP devices; USB Mass Storage (UMS) and the so-called "Manager" mode (named such because of the Windows software for using this mode). Based on the firmware type you choose, an iFP device can run in either mode. In USB mass storage mode, your iFP device will appear as a USB hard drive (e.g. /dev/sda), and you can mount it and copy files to and from it with normal file management tools. In Manager mode, your iFP device will not appear as a USB hard drive, but as another kind of USB device. In this case, you need to use this package (ifp-line) to copy music to and from it. However, Manager mode firmware is the only version that supports Ogg Vorbis files. 2. How can I make my player play Ogg Vorbis files? If you have an iFP-1xx model, you can't. Sorry. According to iRiver, they don't have any auxiliary memory for decoding, which makes supporting them much more difficult. If your player doesn't already play Ogg Vorbis files (many don't), you need to upgrade your firmware. You may need to use the Manager mode firmware (see above). As of August 2004, iRiver has UMS firmware that claims to support Oggs; it is version 1.22G. I have not tested it. Go to http://www.iriver.com/support/download.asp and select your model number, and the "Firmware & Drivers" category. As of August 2004, if You have: You want: iFP-3xx 2.22G (Manager version) (the 'G' is for Ogg!) iFP-5xx 1.32 (Manager version) iFP-7xx Already installed iFP-8xx This is a differently-colored iFP-7xx iFP-10xx 1.23 (I think) You can unzip the file you download with unzip (apt-get install unzip), and then use 'ifp firmupdate' on the resulting .hex file. 3. How can I let a non-root user use the `ifp' tool? Install udev 0.079-080+1 or later, and add the user to the 'plugdev' group. 4. Are the iRiver T10 (and newer) models supported? Not by libifp/ifp-line. The T10 uses the MTP protocol, which is partially supported libgphoto2. Some users have reported success in uploading music to their device with gphoto and its associated utilities. -- Joe Wreschnig , Sun, 22 Aug 2004 16:42:44 -0500 debian/ifp-line-libifp.install0000664000000000000000000000001011550206331013511 0ustar usr/bin debian/libifp4.install0000664000000000000000000000002211550206331012077 0ustar usr/lib/lib*.so.* debian/ifp.10000664000000000000000000000725611550206331010036 0ustar .\" $Id: ifp.1,v 1.2 2004/05/30 15:11:28 yamajun Exp $ .\" .\" Copyright (c)2004 Joe Wreschnig .\" .\" This is free documentation; 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. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" On Debian GNU/Linux systems, the GNU GPL can be found in .\" /usr/share/common-licenses/GPL-2. .TH IFP 1 "May 30th, 2004" .SH NAME \fBifp\fR \- access iRiver iFP audio devices .SH SYNOPSIS \fBifp\fR \fIcommand\fR [\fIarguments ...\fR] .SH DESCRIPTION \fBifp\fR lets you manage your music on an iRiver iFP music player acting in "Manager Mode". If your player is using "UMS Mode", then you don't need this program; it will appear as new drive when you plug it in. .PP This manual page documents the version of \fBifp\fR included as an example application for the libifp library. The interface is intended to mimic the \fBifp\fR binary found in the ifp-line binary package. .PP \fBifp\fR can upload or download files or directories, delete or make directories on the device, format the device, or upgrade your firmware. .SH COMMANDS .TP \fBls\ \fR[\fIdirectory\fR] List the files and directories on the device. The root directory is /. Directories are preceded with 'd' and other files with 'f'. .TP \fBdf\fR Display total and free space on the device. .TP \fBupload \fIlocalfile remotefile\fR Copy the file named \fIlocalfile\fR to the iFP device, and name it \fIremotefile\fR. (This is like \fBcp\fR.) .TP \fBupload \fIlocalfile remotedir\fR Copy the file named \fIlocalfile\fR to the iFP device, into \fIremotedir\fR. (This is like \fBcp\fR.) .TP \fBupload \fIlocaldir remotedir\fR Copy the entire directory \fIlocaldir\fR to the device, into \fIremotedir\fR. This copies into a subdirectory, so \fBupload foo /\fR puts files from the directory \fBfoo\fR info \fB/foo\fR on the device. (This is like \fBcp -R\fR.) This uploads the entire directory, not just audio files. .TP \fBput \fIlocalfile\fR | \fIlocaldir\fR Upload the file or directory to the device, with the same name it has locally. If a directory is given, it is put in /. .TP \fBdownload \fIremotefile localfile\fR .TP \fBdownload \fIremotefile localdir\fR .TP \fBdownload \fIremotedir localdir\fR Like \fBupload\fR, but copies from the iFP device to your system. Some proprietary file types may not be downloaded. .TP \fBget \fIremotefile\fR | \fIremotedir\fR Like \fBput\fR, but copies files or directories from the device to your current working directory. .TP \fBrm\ \fR[\fB\-r\fR]\ \fIfile Delete (recursively) a file (or directory) on the device. .TP \fBrmdir \fIdir\fR Delete an empty directory on the device. .TP \fBmkdir \fIdir\fR Create a directory on the device. .TP \fBbattery\fR Display battery status of the device. .TP \fBtypestring\fR Display the model number of the device. .TP \fBfirmversion\fR Display the firmware revision currently on the device. .TP \fBformat\fR Reformat the device's memory. \fBThis will delete all your music.\fR .TP \fBfirmupdate\ \fIFIRMWARE.HEX\fR Upload the file \fIFIRMWARE.HEX\fR as new firmware for the device. This will not delete your music, but may have many other detrimental effects. Don't turn the device off or unplug it while the firmware is updating, and don't attempt to upload new firmware with a low battery. .SH AUTHORS libifp was written by Geoff Oakham, based on ifp by Yamashiro Jun. This manual page was written for Debian by Joe Wreschnig , but may be used by others. debian/control0000664000000000000000000000345412265626052010607 0ustar Source: libifp Section: libs Priority: extra Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian QA Group Build-Depends: debhelper (>= 5.0.0), libusb-dev, libtool, dh-autoreconf Standards-Version: 3.8.3 Homepage: http://ifp-driver.sourceforge.net/libifp/ Package: libifp-dev Section: libdevel Architecture: any Depends: ${misc:Depends}, libifp4 (= ${binary:Version}) Recommends: libusb-dev Suggests: udev (>= 0.079-080+1) Description: communicate with iRiver iFP audio devices (development files) This package contains files used to develop or compile programs that use libifp. . libifp allows you to communicate with iRiver iFP audio devices. It provides a high-level interface to upload and download files to and from the device, as well as other functions like battery status and firmware updating. Package: libifp4 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: communicate with iRiver iFP audio devices libifp allows you to communicate with iRiver iFP audio devices. It provides a high-level interface to upload and download files to and from the device, as well as other functions like battery status and firmware updating. Package: ifp-line-libifp Section: sound Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Provides: ifp-line Conflicts: ifp-line Replaces: ifp-line Description: command line tool to access iRiver iFP audio players This package contains a tool compatible with the `ifp' program (in the ifp-line package) that uses libifp. . ifp-line tool manages music on iRiver iFP audio devices, including the 1XX, 3XX, 5XX, 7XX, 8XX, and N10 models. It lets you upload or download music or other files to or from the device, manage directories on it, or update your firmware version. debian/libifp-dev.install0000664000000000000000000000010211550246403012572 0ustar usr/include/* usr/lib/lib*.a usr/lib/lib*.so usr/share/man/man3/* debian/patches/0000775000000000000000000000000011550253157010623 5ustar debian/patches/series0000664000000000000000000000003111550246014012024 0ustar debian-changes-1.0.0.2-5 debian/patches/debian-changes-1.0.0.2-50000664000000000000000000001133311550253157014333 0ustar Description: Upstream changes introduced in version 1.0.0.2-5 This patch has been created by dpkg-source during the package build. Here's the last changelog entry, hopefully it gives details on why those changes were made: . libifp (1.0.0.2-5) unstable; urgency=low . * QA upload. * source format 3.0 (quilt) * debian/libifp-dev.install: do not install *.la files (closes: #621655) * Add dependencies on ${misc:Depends} * Add build-dependency on autotools-dev, always copy in config.{sub,guess} since the ones provided in the tarball are outdated. * Install manpage via debian/ifp-line-libifp.manpages, some simplifications in debian/rules. . The person named in the Author field signed this changelog entry. Author: Ralf Treinen Bug-Debian: http://bugs.debian.org/621655 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- libifp-1.0.0.2.orig/src/comp.c +++ libifp-1.0.0.2/src/comp.c @@ -104,7 +104,11 @@ int ifp_selftest(struct ifp_device * dev i = ifp_list_dirs(dev, "\\", noop_dir_callbk, &n); if (i) { - ifp_err_i(i, "couldn't get basic directory listing."); + /* See Debian bug #331585 -- if this tests fails the user + can't even format the device to fix it. Warn instead. -- piman */ + n = 0; + ifp_wrn("couldn't get basic directory listing."); + /* ifp_err_i(i, "couldn't get basic directory listing."); */ return i; } --- libifp-1.0.0.2.orig/examples/ifpline.c +++ libifp-1.0.0.2/examples/ifpline.c @@ -42,6 +42,25 @@ static int update_progress(void * contex return 0; } +/* Calculate a simple "human-readable" value. Fills in 'target' with + 3 characters of value and 1 of unit. Since the iFP is a storage + device, use decimal units. */ +void calc_human(int value, char target[5]) { + if (value > 1000*1000*1000) { + snprintf(target, 5, "%.1f%c", value / (float)(1000*1000*1000), 'G'); + } else if (value > 1000*1000*10) { + snprintf(target, 5, "%3d%c", value / (1000*1000), 'M'); + } else if (value > 1000*1000) { + snprintf(target, 5, "%.1f%c", value / (float)(1000*1000), 'M'); + } else if (value > 1000*10) { + snprintf(target, 5, "%3d%c", value / (1000*1000), 'K'); + } else if (value > 1000) { + snprintf(target, 5, "%.1f%c", value / (float)(1000), 'K'); + } else { + snprintf(target, 5, "%d%c", value, 'B'); + } +} + int upload(struct ifp_device *dev, int argc, char *argv[]) { int retval = 0; char ifp_path[IFP_MAXPATHLEN]; @@ -339,6 +358,29 @@ int ifp_check_connect(struct ifp_device return (ifp_battery(dh) >= 0); } +int ifp_df(struct ifp_device *dev, int argc, char *argv[]) { + int cap = ifp_capacity(dev), free = ifp_freespace(dev); + if (argc == 1) { + if (!strcmp(argv[0], "-h")) { + char cap_target[5], free_target[5]; + calc_human(cap, cap_target); + calc_human(free, free_target); + printf("Capacity: %s\n", cap_target); + printf("Free: %s\n", free_target); + } else { + printf("usage: df [-h]\n"); + return -1; + } + } else if (argc == 0) { + printf("Capacity: %d bytes\n", cap); + printf("Free: %d bytes\n", free); + } else { + printf("usage: df [-h]\n"); + return -1; + } + return 0; +} + int format_media(struct ifp_device *dev) { int i=0; @@ -752,12 +794,12 @@ int main(int argc, char **argv) is_mc = IS_IFP; } - /* no command */ - if (argc < 2) { + /* no command, or help request */ + if (argc < 2 || strstr(cmd, "help") || !strcmp(cmd, "-h")) { help(argv[0]); return 0; } - + usb_init(); retval = load_device(dev, is_mc == IS_MC); @@ -772,8 +814,7 @@ int main(int argc, char **argv) } } else if (strcmp(cmd, "df") == 0) { - printf("Capacity: %d bytes\n", ifp_capacity(dev)); - printf("Free: %d bytes\n", ifp_freespace(dev)); + retval = ifp_df(dev, cur_cnt, cur_arg); } else if (strcmp(cmd, "put") == 0) { retval = ifp_put(dev, cur_cnt, cur_arg); @@ -900,7 +941,7 @@ void help(char *prog) { printf("usage: %s command params\n",prog); printf("commands:\n"); printf(" ls [directory]\n"); - printf(" df\n"); + printf(" df [-h]\n"); printf(" upload localfile ifptarget\n"); printf(" upload localdir ifpdir\n"); printf(" put localfile\n");