mktemp: new recipe; safe temp directory from shell scripts. closes OE #4746
authorlynnlin <lynn.lin@avocent.com>
Tue, 10 Feb 2009 22:42:45 +0000 (23:42 +0100)
committerMichael 'Mickey' Lauer <mickey@vanille-media.de>
Tue, 10 Feb 2009 22:43:09 +0000 (23:43 +0100)
conf/checksums.ini
packages/mktemp/files/add_destdir.patch [new file with mode: 0644]
packages/mktemp/files/disable-strip.patch [new file with mode: 0644]
packages/mktemp/mktemp_1.6.bb [new file with mode: 0644]

index 9845ff6..7c473e7 100644 (file)
@@ -430,6 +430,10 @@ sha256=ab8fdcfdbb6c74ecef4cfaf9e83f955aa422e43f8cd8683c1f2648c70070b88c
 md5=a7bda690ec0ad0bed457fa525e28034a
 sha256=ffac9cd4a6fbc59618bf4e79c389a927491a81b448528278e010a190e2483544
 
+[ftp://ftp.mktemp.org/pub/mktemp/mktemp-1.6.tar.gz]
+md5=3e66f91f8a39c7dc0a67b158aeb9c2ac
+sha256=a1275889c7bb6b3c353d5b9ebb983064e8ef1d29ef8688bd132cec065642d2d9
+
 [http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/MIME-Lite-3.024.tar.gz]
 md5=ca71d1d844f5c4f693e5079a2b4fa9a5
 sha256=886b57c7d8d9903b54dad07b68f58e398745d6d92522e89e2ce714472c09f903
diff --git a/packages/mktemp/files/add_destdir.patch b/packages/mktemp/files/add_destdir.patch
new file mode 100644 (file)
index 0000000..5eede38
--- /dev/null
@@ -0,0 +1,20 @@
+diff -NurpP --minimal mktemp-1.6/Makefile.in mktemp-1.6-addDESTDIR/Makefile.in
+--- mktemp-1.6/Makefile.in     2008-08-17 23:38:34.000000000 +0800
++++ mktemp-1.6-addDESTDIR/Makefile.in  2008-10-20 14:28:42.000000000 +0800
+@@ -106,13 +106,13 @@ $(OBJS): config.h
+ install: install-dirs install-binaries install-man
+ install-dirs:
+-      $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(mandir)/man1
++      $(SHELL) $(srcdir)/mkinstalldirs ${DESTDIR}/$(bindir) ${DESTDIR}/$(mandir)/man1
+ install-binaries: $(PROG)
+-      $(INSTALL) -m 0555 -s $(PROG) $(bindir)/$(PROG)
++      $(INSTALL) -m 0555 -s $(PROG) ${DESTDIR}/$(bindir)/$(PROG)
+ install-man:
+-      $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) $(mandir)/man1/mktemp.1
++      $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) ${DESTDIR}/$(mandir)/man1/mktemp.1
+ check:
+       @echo nothing to check
diff --git a/packages/mktemp/files/disable-strip.patch b/packages/mktemp/files/disable-strip.patch
new file mode 100644 (file)
index 0000000..9626986
--- /dev/null
@@ -0,0 +1,12 @@
+diff -NurpP --minimal mktemp-1.6/Makefile.in mktemp-1.6-disable-strip/Makefile.in
+--- mktemp-1.6/Makefile.in     2009-01-22 15:11:33.000000000 +0800
++++ mktemp-1.6-disable-strip/Makefile.in       2009-01-22 15:13:52.000000000 +0800
+@@ -109,7 +109,7 @@ install-dirs:
+       $(SHELL) $(srcdir)/mkinstalldirs ${DESTDIR}/$(bindir) ${DESTDIR}/$(mandir)/man1
+ install-binaries: $(PROG)
+-      $(INSTALL) -m 0555 -s $(PROG) ${DESTDIR}/$(bindir)/$(PROG)
++      $(INSTALL) -m 0555  $(PROG) ${DESTDIR}/$(bindir)/$(PROG)
+ install-man:
+       $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) ${DESTDIR}/$(mandir)/man1/mktemp.1
diff --git a/packages/mktemp/mktemp_1.6.bb b/packages/mktemp/mktemp_1.6.bb
new file mode 100644 (file)
index 0000000..bd9c4ca
--- /dev/null
@@ -0,0 +1,17 @@
+DESCRIPTION = "Allow safe temporary file creation from shell scripts."
+HOMEPAGE = "http://www.mktemp.org/"
+SECTION = "console/utils"
+LICENSE = "GPLv2 BSD"
+
+inherit autotools
+
+EXTRA_OECONF = "--with-libc"
+
+SRC_URI = "\
+  ftp://ftp.mktemp.org/pub/mktemp/${P}.tar.gz \
+  file://add_destdir.patch;patch=1 \
+  file://disable-strip.patch;patch=1 \
+"
+                       
+# FIXME should rather use update-alternatives
+RCONFLICTS_${PN} = "coreutils"