Bug 193978 - [NEW PORT] misc/countdown: Counts down a specified time interval, beeps, and then exits
Summary: [NEW PORT] misc/countdown: Counts down a specified time interval, beeps, and ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Rodrigo Osorio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-27 20:14 UTC by Neel Chauhan
Modified: 2014-12-26 21:26 UTC (History)
3 users (show)

See Also:


Attachments
shar file for the misc/countdown port (2.19 KB, text/plain)
2014-09-27 20:14 UTC, Neel Chauhan
no flags Details
Shar file for the deskutils/countdown (formerly misc/countdown) port (2.27 KB, text/plain)
2014-09-28 13:28 UTC, Neel Chauhan
no flags Details
deskutils/countdown shar file without "files" directory (1.60 KB, text/plain)
2014-09-28 23:06 UTC, Neel Chauhan
no flags Details
Stock Makefile for the deskutils/countdown port (585 bytes, text/plain)
2014-09-29 12:42 UTC, Neel Chauhan
no flags Details
Updated shar file for the deskutils/countdown port (2.72 KB, text/plain)
2014-09-29 16:16 UTC, Neel Chauhan
no flags Details
Updated shar file for the deskutils/countdown - Ignores Vendor Makefile (2.77 KB, text/plain)
2014-10-03 18:49 UTC, Neel Chauhan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Neel Chauhan freebsd_committer freebsd_triage 2014-09-27 20:14:16 UTC
Created attachment 147734 [details]
shar file for the misc/countdown port

countdown counts down a specified time interval, then beeps and exits.
Comment 1 Jason E. Hale freebsd_committer freebsd_triage 2014-09-28 12:08:56 UTC
- For PORTVERSIONs that use dates, YYYYMMDD format is preferred, i.e. drop the periods
- deskutils would probably be a better category
- Use MAN1PREFIX instead of PREFIX to install the manpage
- files/patch-Makefile is unnecessary because the do-install target overrides the install target in the source Makefile
Comment 2 Neel Chauhan freebsd_committer freebsd_triage 2014-09-28 13:28:48 UTC
Created attachment 147751 [details]
Shar file for the deskutils/countdown (formerly misc/countdown) port

Responding to comment #1, I created an updated shar file addressing your concerns. The changes I made were:
* Changed the category from misc to deskutils
* Changed the PORTVERSION to YYYYMMDD format
* Switched the manpage installation from PREFIX to MAN1PREFIX
* Removed the install: target from the Makefile
Comment 3 Jason E. Hale freebsd_committer freebsd_triage 2014-09-28 22:57:13 UTC
(In reply to neel from comment #2)
> Created attachment 147751 [details]
> Updated shar file for the deskutils/countdown (formerly misc/countdown) port
> 
> Responding to comment #1, I created an updated shar file addressing your
> concerns. The changes I made were:
> * Removed the install: target from the Makefile

I meant just remove the whole patch and the files directory altogether.  Since you have a do-install target in the port Makefile, the install target in the source Makefile is ignored.
Comment 4 Neel Chauhan freebsd_committer freebsd_triage 2014-09-28 23:06:32 UTC
Created attachment 147786 [details]
deskutils/countdown shar file without "files" directory

Looking at Comment #3, I made the changes.
Comment 5 Neel Chauhan freebsd_committer freebsd_triage 2014-09-29 12:42:29 UTC
Created attachment 147803 [details]
Stock Makefile for the deskutils/countdown port

I forgot to mention this: responding to Comment #4, my experience shows that the stock Makefile for countdown runs "make install" even if I just unzip the tar.gz archive and type in "make" without any arguments.

I did attach countdown's original Makefile (came from the .tar.gz itself - not modified) for you to see why I had the Makefile patch in Attachment 147751 [details].
Comment 6 Jason E. Hale freebsd_committer freebsd_triage 2014-09-29 13:34:41 UTC
(In reply to neel from comment #5)
> Created attachment 147803 [details]
> Stock Makefile for the deskutils/countdown port
> 
> I forgot to mention this: responding to Comment #4, my experience shows that
> the stock Makefile for countdown runs "make install" even if I just unzip
> the tar.gz archive and type in "make" without any arguments.
> 
> I did attach countdown's original Makefile (came from the .tar.gz itself -
> not modified) for you to see why I had the Makefile patch in Attachment
> 147751 [details].

If you ran "make install" inside the source directory, then make will use that target, yes.  If you run "make" in the port directory, however, it will use what you have in the do-install target.  If that is not the case, something is seriously wrong.  Because of staging, if you run "make" without arguments in the port directory, it will install into the stage directory automatically.  "make install" will install what is in the stage directory to the system.

I did fail to notice that CC, CFLAGS, and LDFLAGS are not being respected in the source Makefile.  I guess there needs to be a patch anyways.
CC should be defined with a ?=
CFLAGS should be defined with a += (and remove -O too so we are not forcing optimizations)
LDFLAGS line should just be deleted since the stripping will be done automatically by INSTALL_PROGRAM
Comment 7 Neel Chauhan freebsd_committer freebsd_triage 2014-09-29 16:16:47 UTC
Created attachment 147807 [details]
Updated shar file for the deskutils/countdown port

Referring to comment #6, I think you are correct. I might have used "make install" on the stock countdown before writing the FreeBSD port for countdown. On the positive note, I did change the CC to CC?= and the CFLAGS to CFLAGS+=. Sorry for these mistakes, but I'm new to contributing FreeBSD ports.

Keep in mind that I attached the updated shar file for the deskutils/countdown port.
Comment 8 Jan Beich freebsd_committer freebsd_triage 2014-10-03 16:28:01 UTC
May as well ignore vendor Makefile altogether by defining

  MAKEFILE=       /dev/null
  ALL_TARGET=     ${PORTNAME}

because the following is redefinition of implicit target (bmake or gmake):

  countdown:     countdown.c
         $(CC) $(CFLAGS) countdown.c $(LDFLAGS) -o countdown

Or at least keep respecting LDFLAGS provided by either make.conf, Makefile.local or environment.
Comment 9 Neel Chauhan freebsd_committer freebsd_triage 2014-10-03 18:49:34 UTC
Created attachment 147942 [details]
Updated shar file for the deskutils/countdown - Ignores Vendor Makefile

I updated the port to ignore the vendor Makefile.
Comment 10 Rodrigo Osorio freebsd_committer freebsd_triage 2014-12-25 21:45:51 UTC
@Neel : Still interested by making this port ?
Comment 11 Neel Chauhan freebsd_committer freebsd_triage 2014-12-26 00:22:28 UTC
(In reply to Rodrigo Osorio from comment #10)
> @Neel : Still interested by making this port ?

Yes, I still have interest.
Thanks,
Neel
Comment 12 commit-hook freebsd_committer freebsd_triage 2014-12-26 13:58:03 UTC
A commit references this bug:

Author: rodrigo
Date: Fri Dec 26 13:57:55 UTC 2014
New revision: 375622
URL: https://svnweb.freebsd.org/changeset/ports/375622

Log:
  Add new port : countdown, who counts down a specific delay, beep,
  and exit.

  PR:		ports/193978
  Submitted by:	neel@neelc.org

Changes:
  head/deskutils/Makefile
  head/deskutils/countdown/
  head/deskutils/countdown/Makefile
  head/deskutils/countdown/distinfo
  head/deskutils/countdown/files/
  head/deskutils/countdown/files/patch-Makefile
  head/deskutils/countdown/pkg-descr
Comment 13 Rodrigo Osorio freebsd_committer freebsd_triage 2014-12-26 21:26:15 UTC
committed, thanks.