Results 1 to 10 of 10

Thread: Compiling get_flash_videos from git

  1. #1
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Question Compiling get_flash_videos from git

    Hi
    This seems to be the location for the git:- https://github.com/monsieurvideo/get-flash-videos

    I've compiled it like this:-
    Code:
    git clone git://github.com/monsieurvideo/get-flash-videos.git
    cd get-flash-videos
    make
    sudo checkinstall --pakdir "$HOME/Desktop" --pkgname get-flash-videos \
    --pkgversion "1.2.5-git-$(date +%Y%m%d)" --backup=no --deldoc=yes --default
    This gives me a deb package like this:- get-flash-videos_1.2.5-git-20110225-1_i386.deb

    The version in git is 1.2.5.
    Is there a way that I can automatically find the version number so that this part of the command:-
    --pkgversion "1.2.5-git-$(date +%Y%m%d)"
    is future-proof.

    Something like this:-
    --pkgversion "$VERSION-git-$(date +%Y%m%d)"
    How can I find $VERSION automatically?
    Last edited by ron999; February 26th, 2011 at 11:09 AM. Reason: Changed underscores into hyphens in pkgname.

  2. #2
    Join Date
    Apr 2009
    Location
    Germany
    Beans
    2,134
    Distro
    Ubuntu Development Release

    Re: Compiling get_flash_videos from git

    usually you use git describe for that.

    it will print the latest tag and the number of commits since then + the latest sha (prepended with g). Its better than using a date.
    you can parse it as you wish e.g. with
    Code:
    git describe | awk -F- '{print $3}' | sed -e "s/^g//" | xargs git show --pretty="format:%cd"
    Fri Feb 25 16:27:13 2011 -0600
    for the master branch it gives:
    v1.22-117-g27e30c5
    meaning there have been 117 commits since the last annotated tag.

    interestingly the 1.23 is not annotated and 1.24 is on another branch, 1.24_0X are also not annotated. This should actually be done by the author.

    so you might want to use git describe --tag to use the latest tag instead of the lastest annotated tag.
    v1.24_02-32-g27e30c5
    Last edited by MadCow108; February 26th, 2011 at 05:05 PM.

  3. #3
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Compiling get_flash_videos from git

    Hi, thanks for your reply MadCow.
    How do I use git describe --tag?
    How do I incorporate it in my checkinstall command?
    I agree, commits would be much better than the date.

  4. #4
    Join Date
    Feb 2008
    Beans
    5,636

    Re: Compiling get_flash_videos from git

    Try this:
    Code:
    sudo checkinstall --pakdir "$HOME/Desktop" --pkgname get-flash-videos \
    --pkgversion "$(git describe | awk -F- '{print $3}' | sed -e "s/^g//" | xargs git show --pretty="format:%cd"
    Fri Feb 25 16:27:13 2011 -0600)-git-$(date +%Y%m%d)" --backup=no --deldoc=yes --default

  5. #5
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Compiling get_flash_videos from git

    Yes TeoBigus, the command works OK.
    This is the result:-

    get-flash-videos_1.2.5-git-20110226-1_i386.deb

    But what does all this mean here?
    sudo checkinstall --pakdir "$HOME/Desktop" --pkgname get-flash-videos \
    --pkgversion "$(git describe | awk -F- '{print $3}' | sed -e "s/^g//" | xargs git show --pretty="format:%cd"
    Fri Feb 25 16:27:13 2011 -0600)-git-$(date +%Y%m%d)" --backup=no --deldoc=yes --default

    Will I need to change that date each time that I compile?
    What is the significance of Fri Feb 25 16:27:13 2011 -0600 ?

  6. #6
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Compiling get_flash_videos from git

    No the command isn't working Teo.
    I was mistaken.
    The result is get-flash-videos_0-1_i386.deb

  7. #7
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Compiling get_flash_videos from git

    Hi
    I've thought again about this program.
    It's not in the Karmic repo.
    So it's not important to me which 'version' is shown in Synaptic, it won't be over-written.

    I've modified the process like this:-
    Code:
    git clone git://github.com/monsieurvideo/get-flash-videos.git && \
    cd get-flash-videos && make && \
    sudo checkinstall --pakdir "$HOME/Desktop" --pkgname get-flash-videos \
    	--pkgversion "`date +%Y%m%d`-git" --backup=no --deldoc=yes --default
    This is the result:- get-flash-videos_20110303-git-1_i386.deb

    When I need to know which version is installed I can enter a command like this:-
    Code:
    ron@ubuntu:~$ get_flash_videos -v
    get_flash_videos version 1.25 (http://code.google.com/p/get-flash-videos/)

  8. #8
    Join Date
    Dec 2006
    Beans
    7,183

    Re: Compiling get_flash_videos from git

    I have not fully tested this one (I am on my other distro at the moment) but perhaps something like this would be useful:

    Code:
    --pkgversion "$(grep '  $VERSION' get_flash_videos | cut -d '"' -f 2)\
                 -git$(git rev-parse --short HEAD)"
    Could do with a bit more tinkering though I suspect....
    You think that's air you're breathing now?

  9. #9
    Join Date
    Nov 2007
    Beans
    60

    Re: Compiling get_flash_videos from git

    *
    Last edited by kle; August 13th, 2011 at 11:29 AM. Reason: Posted in wrong thread

  10. #10
    Join Date
    Aug 2011
    Beans
    1

    Re: Compiling get_flash_videos from git

    I wannt to now that how How do I use git describe --tag?Or any other option which i can use in its place.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •