diff mbox series

[bug#51015] Add Random Identity Generator (rig)

Message ID PU1PR01MB2155F7CACB67ADAA58FAF72F8DAE9@PU1PR01MB2155.apcprd01.prod.exchangelabs.com
State New
Headers show
Series [bug#51015] Add Random Identity Generator (rig) | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Foo Chuan Wei Oct. 4, 2021, 3:35 p.m. UTC
---
 gnu/packages/patches/rig.patch | 42 ++++++++++++++++++++++++++++++++++
 gnu/packages/shellutils.scm    | 29 +++++++++++++++++++++++
 2 files changed, 71 insertions(+)
 create mode 100644 gnu/packages/patches/rig.patch

Comments

Foo Chuan Wei Oct. 5, 2021, 5:11 a.m. UTC | #1
This is my first patch submission to GNU Guix.

A few possible issues:

1. I have placed the package in gnu/packages/shellutils.scm. Is that the
right place?

2. I copied the package description from Debian, Ubuntu, and NixOS. Is
that allowed?

3. Code indentation may be incorrect.
Liliana Marie Prikler Oct. 5, 2021, 1:22 p.m. UTC | #2
Hi,

Am Montag, den 04.10.2021, 23:35 +0800 schrieb Chuan Wei Foo:
> ---
The commit message is missing here.  In particular, a ChangeLog is
always required, see “info '(guix)Submitting Patches'”.

>  gnu/packages/patches/rig.patch | 42
> ++++++++++++++++++++++++++++++++++
>  gnu/packages/shellutils.scm    | 29 +++++++++++++++++++++++
>  2 files changed, 71 insertions(+)
>  create mode 100644 gnu/packages/patches/rig.patch
> 
> diff --git a/gnu/packages/patches/rig.patch
> b/gnu/packages/patches/rig.patch
> new file mode 100644
> index 0000000000..34b4ff6533
> --- /dev/null
> +++ b/gnu/packages/patches/rig.patch
> @@ -0,0 +1,42 @@
> +--- rig-1.11.orig/Makefile
> ++++ rig-1.11/Makefile
> +@@ -1,20 +1,23 @@
> +-PREFIX=/usr/local
> ++PREFIX=${out}
> + BINDIR=${PREFIX}/bin
> + MANDIR=${PREFIX}/man
> + DATADIR=${PREFIX}/share/rig
> ++CXX=g++
> + 
> + all: rig rig.6
> + rig: rig.cc
> +-	g++ -g rig.cc -o rig -Wall -DDATADIR="\"$(DATADIR)\""
> ++	${CXX} -O2 -g rig.cc -o rig -Wall -DDATADIR="\"$(DATADIR)\""
> + 
> + rig.6: rig.6.in
> + 	sed s@DATADIR@"$(DATADIR)"@g < rig.6.in > rig.6
> + 
> + install: rig rig.6
> +-	install -g 0 -m 755 -o 0 -s rig $(BINDIR)
> +-	install -g 0 -m 644 -o 0 rig.6 $(MANDIR)/man6/rig.6
> +-	install -g 0 -m 755 -o 0 -d $(DATADIR)
> +-	install -g 0 -m 644 -o 0 data/*.idx $(DATADIR)
> ++	install -m 755 -d $(DESTDIR)$(BINDIR)
> ++	install -m 755 -d $(DESTDIR)$(DATADIR)
> ++	install -m 755 -d $(DESTDIR)$(MANDIR)/man6/
> ++	install -m 755 rig $(DESTDIR)$(BINDIR)/rig
> ++	install -m 644 data/*.idx $(DESTDIR)$(DATADIR)
> ++	install -m 644 rig.6 $(DESTDIR)$(MANDIR)/man6/rig.6
You could provide the right #:make-flags, but more accurately replacing
the install phase would also work for this, no? 
 
> + clean:
> + 	rm -rf *~ *.rej *.orig *.o rig rig.6
> +--- rig-1.11.orig/rig.cc
> ++++ rig-1.11/rig.cc
> +@@ -26,6 +26,7 @@
> + #include <time.h>
> + #include <errno.h>
> + #include <assert.h>
> ++#include <string.h>
> + 
> + using namespace std;
> + 
This one could technically be patched with a substitute* after unpack,
which is probably better than shipping a patch for it.

> diff --git a/gnu/packages/shellutils.scm
> b/gnu/packages/shellutils.scm
> index 94b5536df7..ef93977eb9 100644
> --- a/gnu/packages/shellutils.scm
> +++ b/gnu/packages/shellutils.scm
> @@ -35,6 +35,7 @@
>    #:use-module (guix build-system gnu)
>    #:use-module (guix build-system go)
>    #:use-module (guix build-system python)
> +  #:use-module (gnu packages)
>    #:use-module (gnu packages autotools)
>    #:use-module (gnu packages base)
>    #:use-module (gnu packages bison)
> @@ -398,3 +399,31 @@ the UNIX philosophy, these commands are designed
> to be composed via pipes. A
>  large collection of functions such as basename, replace, contains or
> is_dir
>  are provided as arguments to these commands.")
>      (license license:expat)))
> +
> +(define-public rig
> +  (package
> +    (name "rig")
> +    (version "1.11")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "mirror://sourceforge/rig/rig/"
> +                                  version "/rig-"
> +                                  version ".tar.gz"))
> +              (sha256
> +                (base32
> +                  "1f3snysjqqlpk2kgvm5p2icrj4lsdymccmn3igkc2f60smqck
> gq0"))
> +              (patches (search-patches "rig.patch"))))
> +    (build-system gnu-build-system)
> +    (arguments '(#:phases (modify-phases %standard-phases
> +                                         (delete 'configure))
> +                 #:tests? #f))
> +    (synopsis "Random identity generator")
> +    (description
> +      "RIG (Random Identity Generator) is a free replacement for a
> shareware
> +program out there called 'fake'. It generates random, yet real-
> looking,
> +personal data. It is useful if you need to feed a name to a Web
> site,
> +BBS, or real person, and are too lazy to think of one yourself.
> Also,
> +if the Web site/BBS/person you are giving the information to tries
> to
> +cross-check the city, state, zip, or area code, it will check out.")
I think we can do without references to non-free software in that
description.
> +      (home-page "http://rig.sourceforge.net")
> +      (license license:gpl2))
License is actually GPL2+.

Regards,
Liliana
diff mbox series

Patch

diff --git a/gnu/packages/patches/rig.patch b/gnu/packages/patches/rig.patch
new file mode 100644
index 0000000000..34b4ff6533
--- /dev/null
+++ b/gnu/packages/patches/rig.patch
@@ -0,0 +1,42 @@ 
+--- rig-1.11.orig/Makefile
++++ rig-1.11/Makefile
+@@ -1,20 +1,23 @@
+-PREFIX=/usr/local
++PREFIX=${out}
+ BINDIR=${PREFIX}/bin
+ MANDIR=${PREFIX}/man
+ DATADIR=${PREFIX}/share/rig
++CXX=g++
+ 
+ all: rig rig.6
+ rig: rig.cc
+-	g++ -g rig.cc -o rig -Wall -DDATADIR="\"$(DATADIR)\""
++	${CXX} -O2 -g rig.cc -o rig -Wall -DDATADIR="\"$(DATADIR)\""
+ 
+ rig.6: rig.6.in
+ 	sed s@DATADIR@"$(DATADIR)"@g < rig.6.in > rig.6
+ 
+ install: rig rig.6
+-	install -g 0 -m 755 -o 0 -s rig $(BINDIR)
+-	install -g 0 -m 644 -o 0 rig.6 $(MANDIR)/man6/rig.6
+-	install -g 0 -m 755 -o 0 -d $(DATADIR)
+-	install -g 0 -m 644 -o 0 data/*.idx $(DATADIR)
++	install -m 755 -d $(DESTDIR)$(BINDIR)
++	install -m 755 -d $(DESTDIR)$(DATADIR)
++	install -m 755 -d $(DESTDIR)$(MANDIR)/man6/
++	install -m 755 rig $(DESTDIR)$(BINDIR)/rig
++	install -m 644 data/*.idx $(DESTDIR)$(DATADIR)
++	install -m 644 rig.6 $(DESTDIR)$(MANDIR)/man6/rig.6
+ 
+ clean:
+ 	rm -rf *~ *.rej *.orig *.o rig rig.6
+--- rig-1.11.orig/rig.cc
++++ rig-1.11/rig.cc
+@@ -26,6 +26,7 @@
+ #include <time.h>
+ #include <errno.h>
+ #include <assert.h>
++#include <string.h>
+ 
+ using namespace std;
+ 
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index 94b5536df7..ef93977eb9 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -35,6 +35,7 @@ 
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system python)
+  #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
@@ -398,3 +399,31 @@  the UNIX philosophy, these commands are designed to be composed via pipes. A
 large collection of functions such as basename, replace, contains or is_dir
 are provided as arguments to these commands.")
     (license license:expat)))
+
+(define-public rig
+  (package
+    (name "rig")
+    (version "1.11")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/rig/rig/"
+                                  version "/rig-"
+                                  version ".tar.gz"))
+              (sha256
+                (base32
+                  "1f3snysjqqlpk2kgvm5p2icrj4lsdymccmn3igkc2f60smqckgq0"))
+              (patches (search-patches "rig.patch"))))
+    (build-system gnu-build-system)
+    (arguments '(#:phases (modify-phases %standard-phases
+                                         (delete 'configure))
+                 #:tests? #f))
+    (synopsis "Random identity generator")
+    (description
+      "RIG (Random Identity Generator) is a free replacement for a shareware
+program out there called 'fake'. It generates random, yet real-looking,
+personal data. It is useful if you need to feed a name to a Web site,
+BBS, or real person, and are too lazy to think of one yourself. Also,
+if the Web site/BBS/person you are giving the information to tries to
+cross-check the city, state, zip, or area code, it will check out.")
+      (home-page "http://rig.sourceforge.net")
+      (license license:gpl2))