diff mbox

[4/6] tzdump: new host package

Message ID bd0d8b1e63d1946a8dd482f5d40c54008bed8081.1396900553.git.yann.morin.1998@free.fr
State Accepted
Headers show

Commit Message

Yann E. MORIN April 7, 2014, 7:58 p.m. UTC
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>

tzdump takes timezone info in the installed tzdata format, and
outputs timezone info parseable by uClibc.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[yann.morin.1998@free.fr: split zic header-install to its own cset]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/tzdump/tzdump.mk | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 package/tzdump/tzdump.mk

Comments

Peter Korsgaard April 8, 2014, 10:13 p.m. UTC | #1
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
 > tzdump takes timezone info in the installed tzdata format, and
 > outputs timezone info parseable by uClibc.

 > Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
 > [yann.morin.1998@free.fr: split zic header-install to its own cset]
 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > ---
 >  package/tzdump/tzdump.mk | 24 ++++++++++++++++++++++++
 >  1 file changed, 24 insertions(+)
 >  create mode 100644 package/tzdump/tzdump.mk

 > diff --git a/package/tzdump/tzdump.mk b/package/tzdump/tzdump.mk
 > new file mode 100644
 > index 0000000..471a719
 > --- /dev/null
 > +++ b/package/tzdump/tzdump.mk
 > @@ -0,0 +1,24 @@
 > +################################################################################
 > +#
 > +# tzdump
 > +#
 > +################################################################################
 > +
 > +TZDUMP_VERSION = 65a10105564801094b18c3fcacf4dde4c44e4ab8
 > +TZDUMP_SITE = $(call github,alexandrebelloni,tzdump,$(TZDUMP_VERSION))
 > +TZDUMP_DEPENDENCIES = host-zic

It doesn't look like this is needed.

 > +
 > +define HOST_TZDUMP_BUILD_CMDS
 > +	(cd $(@D) ;\
 > +		$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o tzdump tzdump.c ; \
 > +	)

We don't really need the subshell here.

 > +endef
 > +
 > +define HOST_TZDUMP_INSTALL_CMDS
 > +	mkdir -p $(HOST_DIR)/usr/sbin
 > +	install -D -m 755 $(@D)/tzdump $(HOST_DIR)/usr/sbin/tzdump

install -D already creates the destination directory, so mkdir can be
dropped.

We normally use the INSTALL variable instead of explicit 'install'.

Committed with these fixes, thanks.
Yann E. MORIN April 8, 2014, 10:18 p.m. UTC | #2
Peter, All,

On 2014-04-09 00:13 +0200, Peter Korsgaard spake thusly:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> 
>  > From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>  > tzdump takes timezone info in the installed tzdata format, and
>  > outputs timezone info parseable by uClibc.
> 
>  > Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>  > [yann.morin.1998@free.fr: split zic header-install to its own cset]
>  > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>  > ---
>  >  package/tzdump/tzdump.mk | 24 ++++++++++++++++++++++++
>  >  1 file changed, 24 insertions(+)
>  >  create mode 100644 package/tzdump/tzdump.mk
> 
>  > diff --git a/package/tzdump/tzdump.mk b/package/tzdump/tzdump.mk
>  > new file mode 100644
>  > index 0000000..471a719
>  > --- /dev/null
>  > +++ b/package/tzdump/tzdump.mk
>  > @@ -0,0 +1,24 @@
>  > +################################################################################
>  > +#
>  > +# tzdump
>  > +#
>  > +################################################################################
>  > +
>  > +TZDUMP_VERSION = 65a10105564801094b18c3fcacf4dde4c44e4ab8
>  > +TZDUMP_SITE = $(call github,alexandrebelloni,tzdump,$(TZDUMP_VERSION))
>  > +TZDUMP_DEPENDENCIES = host-zic
> 
> It doesn't look like this is needed.

Well, it's host-tzdump that needs host-zic, since the former needs a
header installed by the latter.

So, this should have been:

    HOST_TZDUMP_DEPENDENCIES = host-zic

>  > +define HOST_TZDUMP_INSTALL_CMDS
>  > +	mkdir -p $(HOST_DIR)/usr/sbin
>  > +	install -D -m 755 $(@D)/tzdump $(HOST_DIR)/usr/sbin/tzdump
> 
> install -D already creates the destination directory, so mkdir can be
> dropped.
> 
> We normally use the INSTALL variable instead of explicit 'install'.

Doh, I missed that one... :-(

> Committed with these fixes, thanks.

Hopefully, you'll get this in time to re-fix the host-zic dependency
before you push...

Regards,
Yann E. MORIN.
Peter Korsgaard April 8, 2014, 10:25 p.m. UTC | #3
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

Hi,

 >> > +TZDUMP_DEPENDENCIES = host-zic
 >> 
 >> It doesn't look like this is needed.

 > Well, it's host-tzdump that needs host-zic, since the former needs a
 > header installed by the latter.

 > So, this should have been:

 >     HOST_TZDUMP_DEPENDENCIES = host-zic

Ahh ok, I'll fix that up.
diff mbox

Patch

diff --git a/package/tzdump/tzdump.mk b/package/tzdump/tzdump.mk
new file mode 100644
index 0000000..471a719
--- /dev/null
+++ b/package/tzdump/tzdump.mk
@@ -0,0 +1,24 @@ 
+################################################################################
+#
+# tzdump
+#
+################################################################################
+
+TZDUMP_VERSION = 65a10105564801094b18c3fcacf4dde4c44e4ab8
+TZDUMP_SITE = $(call github,alexandrebelloni,tzdump,$(TZDUMP_VERSION))
+TZDUMP_DEPENDENCIES = host-zic
+
+define HOST_TZDUMP_BUILD_CMDS
+	(cd $(@D) ;\
+		$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o tzdump tzdump.c ; \
+	)
+endef
+
+define HOST_TZDUMP_INSTALL_CMDS
+	mkdir -p $(HOST_DIR)/usr/sbin
+	install -D -m 755 $(@D)/tzdump $(HOST_DIR)/usr/sbin/tzdump
+endef
+
+$(eval $(host-generic-package))
+
+TZDUMP = $(HOST_DIR)/usr/sbin/tzdump