diff options
author | xiota | 2022-09-13 16:53:01 -0700 |
---|---|---|
committer | xiota | 2022-09-13 16:59:47 -0700 |
commit | 760b8ce500249e050306437ffc30d1b4bf2ed198 (patch) | |
tree | d768e088d83f7d180e12339e15f6469c717357cc | |
parent | 2ca688462f00d213fd850a9ed7f28c5923a1acf5 (diff) | |
download | aur-760b8ce500249e050306437ffc30d1b4bf2ed198.tar.gz |
update packaging
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 60 | ||||
-rw-r--r-- | combined-mp3rename_0.6.9-and-jf-archlinux-and-jf-manpage-and-jf-padnumbers.diff | 288 | ||||
-rw-r--r-- | mp3rename-jf-long-options.patch | 4 |
5 files changed, 60 insertions, 316 deletions
@@ -1,17 +1,19 @@ pkgbase = mp3rename - pkgdesc = mp3rename renames mp3-files according id3-infos - pkgver = 0.6.9 - pkgrel = 4 - url = http://packages.debian.org/unstable/sound/mp3rename + pkgdesc = Rename mp3 files based on id3tags + pkgver = 0.6 + pkgrel = 13 + url = https://salsa.debian.org/debian/mp3rename arch = i686 arch = x86_64 license = GPL + depends = glibc + provides = mp3rename + conflicts = mp3rename source = http://ftp.debian.org/debian/pool/main/m/mp3rename/mp3rename_0.6.orig.tar.gz - source = combined-mp3rename_0.6.9-and-jf-archlinux-and-jf-manpage-and-jf-padnumbers.diff + source = http://ftp.debian.org/debian/pool/main/m/mp3rename/mp3rename_0.6-13.debian.tar.xz source = mp3rename-jf-long-options.patch - md5sums = c3c3dff9ed533103eede86fbce75a7b1 - md5sums = b11dc25c5af85f159680ed8401017445 - md5sums = 695bc74356443fb4090585f9bcdf390a + sha256sums = 3bd0c73d542901a012ace7a16957ff79a8b297ed98a412004320a22dcfdc8c5e + sha256sums = 388dcab2f4deb34a0a857c2fe7c10d2e34b00ac8af56e8bdc004ff8e7da22966 + sha256sums = 2cf135666f30e315e1023302229a3b9df4db31a78339cb70c00b5efd45a32ee5 pkgname = mp3rename - diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..ddd398d2942f --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +pkg +src +*.tar.* +*.log @@ -1,28 +1,54 @@ # Contributor: Jan Fader <jan.fader@web.de> pkgname=mp3rename -pkgver=0.6.9 -pkgrel=4 -pkgdesc="mp3rename renames mp3-files according id3-infos" +pkgver=0.6 +pkgrel=13 +pkgdesc="Rename mp3 files based on id3tags" arch=('i686' 'x86_64') license=('GPL') -url="http://packages.debian.org/unstable/sound/mp3rename" -install= -source=(http://ftp.debian.org/debian/pool/main/m/mp3rename/mp3rename_0.6.orig.tar.gz -combined-mp3rename_0.6.9-and-jf-archlinux-and-jf-manpage-and-jf-padnumbers.diff -mp3rename-jf-long-options.patch +#url="http://packages.debian.org/unstable/sound/mp3rename" +url="https://salsa.debian.org/debian/mp3rename" + +depends=('glibc') + +provides=("$pkgname") +conflicts=("$pkgname") + +source=( + "http://ftp.debian.org/debian/pool/main/m/mp3rename/${pkgname}_${pkgver}.orig.tar.gz" + "http://ftp.debian.org/debian/pool/main/m/mp3rename/${pkgname}_${pkgver}-${pkgrel}.debian.tar.xz" + "mp3rename-jf-long-options.patch" +) + +sha256sums=( + '3bd0c73d542901a012ace7a16957ff79a8b297ed98a412004320a22dcfdc8c5e' + '388dcab2f4deb34a0a857c2fe7c10d2e34b00ac8af56e8bdc004ff8e7da22966' + '2cf135666f30e315e1023302229a3b9df4db31a78339cb70c00b5efd45a32ee5' ) build() { - cd $srcdir/$pkgname-0.6.orig - patch -i ../combined-mp3rename_0.6.9-and-jf-archlinux-and-jf-manpage-and-jf-padnumbers.diff - patch -i ../mp3rename-jf-long-options.patch + cd "$srcdir/$pkgname-${pkgver}.orig" + + # apply debian patches + for p in $(cat "$srcdir/debian/patches/series") ; do + patch -p 1 < "$srcdir/debian/patches/$p" + done + + # apply long-options patch + patch -p 1 < "$srcdir/mp3rename-jf-long-options.patch" + + # build binary make || return 1 - gzip mp3rename.1 + + # compress man page + gzip "$srcdir/debian/${pkgname}.1" } + package() { - cd $srcdir/$pkgname-0.6.orig - export PREFIX=$pkgdir; make install + cd "$srcdir/$pkgname-${pkgver}.orig" + + # install binary + PREFIX="$pkgdir" make install + + # install man page + install -D -m644 "$srcdir/debian/${pkgname}.1.gz" -t "${pkgdir}/usr/share/man/man1" } -md5sums=('c3c3dff9ed533103eede86fbce75a7b1' - 'b11dc25c5af85f159680ed8401017445' - '695bc74356443fb4090585f9bcdf390a') diff --git a/combined-mp3rename_0.6.9-and-jf-archlinux-and-jf-manpage-and-jf-padnumbers.diff b/combined-mp3rename_0.6.9-and-jf-archlinux-and-jf-manpage-and-jf-padnumbers.diff deleted file mode 100644 index 397fbe586e6f..000000000000 --- a/combined-mp3rename_0.6.9-and-jf-archlinux-and-jf-manpage-and-jf-padnumbers.diff +++ /dev/null @@ -1,288 +0,0 @@ ---- mp3rename-0.6/mp3rename.c -+++ mp3rename-0.6/mp3rename.c 2007-05-17 05:20:02.000000000 +0200 -@@ -20,12 +20,13 @@ - void display_help(); - void buildtag(char *buf, char *title, char *artist, char *album, char *year, char *comment, char *genre); - void set_filename(int argc,char *argv[]); -+void rtrim(char* astring); - - int main(int argc, char *argv[]) - { - FILE *fp; -- int verbose = 0, forced = 0, burn = 0, info = 0, all = 0; -- unsigned char sig[2]; -+ int verbose = 0, forced = 0, burn = 0, info = 0, all = 0, padtrack = 0; -+ unsigned char sig[3]; - char genre[1]; - char input_char; - int i=0,plaatsen = 0; -@@ -36,13 +37,14 @@ - - if (argc < 2 ) /* If nothing is given */ - { -- fprintf(stderr,"Mp3rename\n\nusage: [-vfhsbia] [file ...]\n\n"); -+ fprintf(stderr,"Mp3rename\n\nusage: [-vfhsbia] [file ...]\n\nUse 'mp3rename -h' for a usage summary\n\n"); -+ - return 0; - } - - /* Lets checkout the options */ - -- while ((ch = getopt(argc, argv, "vfhsbia")) != -1) -+ while ((ch = getopt(argc, argv, "vfhsbiap")) != -1) - switch (ch) - { - case 'v': /* Verbose mode */ -@@ -66,8 +68,11 @@ - case 'a': /* Ask everything */ - all = 1; - break; -+ case 'p': -+ padtrack = 1; -+ break; - default: /* If wrong option is given */ -- fprintf(stderr,"Mp3rename\n\nusage: [-vfh] [file ...]\n\n"); -+ fprintf(stderr,"Mp3rename\n\nusage: [-vfhsbia] [file ...]\n\nUse 'mp3rename -h' for a usage summary\n\n"); - exit(1); - } - argv += optind; -@@ -91,7 +96,7 @@ - strcat(filenamelook,".mp3"); /* add .mp3 so that the filename will be complete */ - - do { -- char title[31]="", artist[31]="", album[31]="", year[5]="", comment[31]="", fbuf[4], newfilename[160]="",nieuw[150]="",dir[150]="",dirsource[200],fullline[228]="", burnname[29]=""; -+ char title[31]="", artist[31]="", album[31]="", year[5]="", comment[31]="", fbuf[4], newfilename[160]="",nieuw[150]="",dir[150]="",dirsource[200],fullline[228]="", burnname[29]="", track; - plaatsen = 0; - - if ( !( fp=fopen(*argv,"rb+") ) ) /* If the file doesn exist */ -@@ -104,6 +109,8 @@ - /* Lets check if we have a real mp3 file */ - - fread(sig,sizeof(sig),1,fp); -+ /* ID3v2 */ -+ if(sig[0]!='I' || sig[1]!='D' || sig[2]!='3'){ - sig[0] &= 0xff; - sig[1] &= 0xf0; - if(!((sig[0] == 0xff) && (sig[1] == 0xf0))) -@@ -112,7 +119,8 @@ - fclose(fp); - ++argv; - continue; -- } -+ } -+ } - - /* Lets go to the beginning of the tag */ - if ( fseek(fp, -128, SEEK_END )) -@@ -131,7 +139,14 @@ - fread(artist,1,30,fp); artist[30] = '\0'; - fread(album,1,30,fp); album[30] = '\0'; - fread(year,1,4,fp); year[4] = '\0'; -- fread(comment,1,30,fp); comment[30] = '\0'; -+ fread(comment,1,30,fp); -+ if (comment[28] == '\0' && comment[29] != '\0') { -+ /* ID3v1.1 - specify track number in the last byte of comment field*/ -+ track = comment[29]; -+ } -+ else -+ { track = 0; } -+ comment[30] = '\0'; - fread(genre,1,1,fp); - fseek(fp, -128, SEEK_END); /* back to the beginning of the tag */ - } -@@ -290,6 +305,17 @@ - { - printf("Artist : %s\n",artist); - printf("Title : %s\n",title); -+ if(track!='\0') -+ { -+ if(track < 10 && padtrack == 1) -+ { -+ printf("Track : 0%i\n",track); -+ } -+ else -+ { -+ printf("Track : %i\n",track); -+ } -+ } - printf("Album : %s\n",album); - printf("Year : %s\n\n",year); - ++argv; -@@ -297,31 +323,10 @@ - } - - /* Remove trailing spaces */ -- i=strlen(artist)-1; -- while (i && artist[i]==' ') -- { -- artist[i]='\0'; -- i--; -- } -- -- i=strlen(title)-1; -- while (i && title[i]==' ') -- { -- title[i]='\0'; -- i--; -- } -- i=strlen(album)-1; -- while (i && album[i]==' ') -- { -- album[i]='\0'; -- i--; -- } -- i=strlen(year)-1; -- while (i && year[i]==' ') -- { -- year[i]='\0'; -- i--; -- } -+ rtrim((char*)&artist); -+ rtrim((char*)&title); -+ rtrim((char*)&album); -+ rtrim((char*)&year); - - /* We go through the filenamelook until we find a &x combination - then we replace the &x with album/title/year/artis */ -@@ -352,6 +357,18 @@ - strcpy(newfilename,tmp); - i++; - break; -+ case 'k': -+ if(track < 10 && padtrack == 1) -+ { -+ sprintf(tmp,"%s0%d",newfilename,track); -+ } -+ else -+ { -+ sprintf(tmp,"%s%d",newfilename,track); -+ } -+ strcpy(newfilename,tmp); -+ i++; -+ break; - default: - printf("Illegal char in config file please use the option '-s help' for more information\n"); - exit(1); -@@ -383,9 +400,11 @@ - - /* Build the new tag from the new names */ - -- buildtag(fullline,title,artist,album,year,comment,genre); -- fwrite(fullline,1,128,fp); -- -+ if ((forced) || (all)) -+ { -+ buildtag(fullline,title,artist,album,year,comment,genre); -+ fwrite(fullline,1,128,fp); -+ } - fclose(fp); - - /* Lets catch illegal characters */ -@@ -436,6 +455,17 @@ - return 0; - } - -+void rtrim(char* astring){ -+ int i; -+ -+ i=strlen(astring)-1; -+ while (i && astring[i]==' ') -+ { -+ astring[i]='\0'; -+ i--; -+ } -+} -+ - void buildtag(char *buf, char *title, char *artist, char *album, char *year, char *comment, char *genre) - { - -@@ -448,7 +478,7 @@ - strncat(buf,album,30); - pad(year,4); - strncat(buf,year,4); -- pad(comment,30); -+ pad(comment,30); - strncat(buf,comment,30); - strncat(buf,genre,1); - } -@@ -476,6 +506,7 @@ - printf("\t-h\t Display this help message.\n"); - printf("\t-b\t Limit the file size to 32 chars.\n"); - printf("\t-i\t Only show the id3tags.\n"); -+ printf("\t-p\t Pad the track number with a leading zero when less than 10.\n"); - printf("\t-a\t Ask everything for the id3tag.\n\n"); - printf("\t-s\t Set the default filename look.\n"); - printf("\t \t for more help on this option: -s help\n\n"); -@@ -500,7 +531,7 @@ - printf("Mp3rename 0.6\n\n"); - printf(" Use this option to set the default look of the file\n"); - printf(" The information is saved in ~/.mp3rename\n"); -- printf(" You can use &t title, &b album, &y year and &a artist\n\n"); -+ printf(" You can use &t title, &b album, &y year, &k track and &a artist\n\n"); - printf(" Example : mp3rename -s '(&a)-&t-&b'\n"); - printf(" for (artist)-title-album.mp3\n\n"); - return; ---- mp3rename-0.6.orig/Makefile 2000-05-06 12:36:10.000000000 +0200 -+++ mp3rename-0.6/Makefile 2007-05-17 04:29:18.000000000 +0200 -@@ -2,6 +2,7 @@ - SRCS = mp3rename.c - OBJS = mp3rename.o - RM = /bin/rm -+INSTALL = /bin/install - - all: mp3rename - -@@ -12,6 +13,5 @@ - $(RM) -f $(OBJS) $(PROG) *~ *core - - install: -- $(INSTALL) -c mp3rename $(PREFIX)/bin/mp3rename -- $(INSTALL) -c mp3rename.1.gz $(PREFIX)/man/man1/ -- -\ Kein Zeilenumbruch am Dateiende. -+ $(INSTALL) -D mp3rename.1.gz $(PREFIX)/usr/share/man/man1/mp3rename.1.gz -+ $(INSTALL) -D mp3rename $(PREFIX)/usr/bin/mp3rename ---- mp3rename-0.6.orig/mp3rename.1 1970-01-01 01:00:00.000000000 +0100 -+++ mp3rename-0.6/mp3rename.1 2007-05-17 04:46:24.000000000 +0200 -@@ -0,0 +1,41 @@ -+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -+.TH MP3RENAME "1" "September 2005" "Debian GNU/Linux" "User Commands" -+.SH NAME -+Mp3rename \- Rename mp3 files based on id3tags -+.SH DESCRIPTION -+Mp3rename 0.6 -+.SH OPTIONS -+.TP -+\fB\-f\fR -+Force non id3 rename. -+.TP -+\fB\-v\fR -+Verbose mode. -+.TP -+\fB\-h\fR -+Display this help message. -+.TP -+\fB\-b\fR -+Limit the file size to 32 chars. -+.TP -+\fB\-i\fR -+Only show the id3tags. -+.TP -+\fB\-p\fR -+Pad the track number with a leading zero when less than 10. -+.TP -+\fB\-a\fR -+Ask everything for the id3tag. -+.TP -+\fB\-s\fR -+Set the default filename look. -+for more help on this option: \fB\-s\fR help -+.PP -+Sander Janssen <janssen@rendo.dekooi.nl> -+.IP -+Use this option to set the default look of the file -+The information is saved in ~/.mp3rename -+You can use &t title, &b album, &y year, &k track and &a artist -+.IP -+Example : mp3rename \fB\-s\fR '(&a)\-&t\-&b' -+for (artist)\-title\-album.mp3 diff --git a/mp3rename-jf-long-options.patch b/mp3rename-jf-long-options.patch index a9db3ce18cac..dcb8c420879f 100644 --- a/mp3rename-jf-long-options.patch +++ b/mp3rename-jf-long-options.patch @@ -1,5 +1,5 @@ ---- ../src-org/mp3rename-0.6.orig/mp3rename.c 2007-05-25 23:11:44.000000000 +0200 -+++ mp3rename.c 2007-05-25 23:51:42.000000000 +0200 +--- a/mp3rename.c ++++ b/mp3rename.c @@ -15,6 +15,7 @@ #include <ctype.h> #include <string.h> |