[jbrout] Enable building of SVN checkouts again (conditional svn_checkout).
Matej Cepl
mcepl at fedoraproject.org
Sat Dec 11 00:39:09 UTC 2010
commit ed1283313bcd135b7954dab47177a5b237e0c08e
Author: Matěj Cepl <mcepl at redhat.com>
Date: Sat Dec 11 00:19:34 2010 +0100
Enable building of SVN checkouts again (conditional svn_checkout).
jbrout-Makefile | 2 +-
jbrout-clean-SVN-checkout.sh | 26 ++++++++---
jbrout-install.sh | 2 +-
jbrout.spec | 101 ++++++++++++++++--------------------------
4 files changed, 60 insertions(+), 71 deletions(-)
---
diff --git a/jbrout-Makefile b/jbrout-Makefile
index 38e8b50..56ef323 100644
--- a/jbrout-Makefile
+++ b/jbrout-Makefile
@@ -4,7 +4,7 @@ PODIR=po
all: build
install:
- jbrout/install-script $(DESTDIR)
+ ./install-script $(DESTDIR)
build:
find $(PODIR) -name \*.po -exec msgfmt -vc '{}' \;
diff --git a/jbrout-clean-SVN-checkout.sh b/jbrout-clean-SVN-checkout.sh
index d829627..aa67584 100644
--- a/jbrout-clean-SVN-checkout.sh
+++ b/jbrout-clean-SVN-checkout.sh
@@ -1,10 +1,24 @@
#!/bin/sh
+set -x
-#svn export -r 282 http://jbrout.googlecode.com/svn/trunk/readme.txt jbrout-0.3.282/readme.txt
+[ -n "$1" ] && REPACK="true"
-find . -name \*.exe -o -name \*.dll -print
+if [ -n "$REPACK" ] ; then
+ [ -d "jbrout" ] && rm -rf jbrout
+ tar xvf "$1"
+ cd jbrout
+fi
-## fix CRLF
-#dos2unix jbrout-0.3.282/plugins/__init__.py
-#dos2unix jbrout-0.3.282/plugins/multiexport/libs/__init__.py
-#dos2unix jbrout-0.3.282/libs/dict4ini.py
+rm -rf dist
+rm -rvf jbrout/plugins/multiexport/libs/picasaweb/{atom,gdata}/
+
+find . -name \*.exe -o -name \*.dll -print -delete
+find . -name \*.py -o -name \*.glade -o -name \*.xsl -exec dos2unix -k '{}' \;
+find . -type f -executable -exec chmod -x {} \;
+find . -name \*.py -exec sed -i -e '/^#!\/usr.*\/bin\/.*python/d' '{}' \;
+
+if [ "x$REPACK" = "xtrue" ] ; then
+ cd ..
+ rm -fv "$1"
+ tar cvjf jbrout.tar.bz2 jbrout
+fi
diff --git a/jbrout-install.sh b/jbrout-install.sh
index a761a5c..0284933 100644
--- a/jbrout-install.sh
+++ b/jbrout-install.sh
@@ -15,5 +15,5 @@ chmod -R a+rX,u+w plugins $DESTDIR/usr/share/
install -p -m a+r,u+w -t $DESTDIR/usr/share/jbrout/ *.py
install -p -m a+r,u+w -t $DESTDIR/usr/share/jbrout/ data/gpl.txt
install -p -m a+r,u+w -t $DESTDIR/usr/share/jbrout/ data/jbrout.glade
-chmod +x $DESTDIR/usr/share/jbrout/jbrout.py
+chmod -x $DESTDIR/usr/share/jbrout/jbrout.py
diff --git a/jbrout.spec b/jbrout.spec
index a9cb947..fc11c33 100644
--- a/jbrout.spec
+++ b/jbrout.spec
@@ -1,41 +1,21 @@
+%define svn_checkout 1
+
Name: jbrout
-Version: 0.3.284
+Version: 0.3.323
+%if 0%{?svn_checkout}
+Release: 0.svn323.1
+%else
Release: 2%{?dist}
+%endif
Summary: Photo manager, written in python/pygtk
Group: Applications/Multimedia
License: GPLv2
-URL: http://jbrout.python-hosting.com/wiki
-
-## in order to rebuild Source0 I advice you to type something like
-## cat ../SPECS/jbrout.spec | grep ^# | grep -v "##" | sed s,^#,,g | bash
-
-# svn export -r 282 http://jbrout.googlecode.com/svn/trunk/jbrout jbrout-0.3.282
-# svn export -r 282 http://jbrout.googlecode.com/svn/trunk/readme.txt jbrout-0.3.282/readme.txt
-
-## remove duplicated system libraries
-# rm -rf jbrout-0.3.282/plugins/multiexport/libs/picasaweb/atom/
-# rm -rf jbrout-0.3.282/plugins/multiexport/libs/picasaweb/gdata/
-# rm -f jbrout-0.3.282/data/tools/*.exe
-
-## fix CRLF
-# dos2unix jbrout-0.3.282/plugins/__init__.py
-# dos2unix jbrout-0.3.282/plugins/multiexport/libs/__init__.py
-# dos2unix jbrout-0.3.282/libs/dict4ini.py
-
-## remove unneeded shebang
-# sed -i -e '1d' jbrout-0.3.282/plugins/multiexport/libs/picasaweb/__init__.py
-# sed -i -e '2d' jbrout-0.3.282/jbrout/folderselect.py
-# sed -i -e '1d' jbrout-0.3.282/jbrout/tools.py
-
-## drop executable bit
-# find jbrout-0.3.282 -type f -executable -exec chmod -x {} \;
-
-## compress the rest of the code
-# tar cfJ jbrout-0.3.282.tar.xz jbrout-0.3.282
-
+URL: http://jbrout.manatlan.com/
+%if 0%{?svn_checkout}
+Source0: %{name}.tar.bz2
+%else
Source0: http://jbrout.free.fr/download/sources/%{name}_%{version}.tar.gz
-#Source0: http://jbrout.free.fr/download/sources/%{name}_%{version}.tar.xz
-#Source0: %{name}-%{version}.tar.xz
+%endif
Source1: jbrout-Makefile
Source2: jbrout.desktop
Source3: jbrout-usr_bin
@@ -52,37 +32,32 @@ BuildRequires: gettext, desktop-file-utils,
%description
jBrout is able to :
- * manage albums/photos (= folders/files)
- * tag photos with IPTC keywords
- * use internal jpeg thumbnail
- * comment photos (with jpeg comment) and album (textfile in
- folder)
- * rotate loss-less jpeg (and internal jpeg thumbnail)
- use EXIF info (date, size ..)
- * search pictures (tags, comment, date, ...)
- * use plugins (to export to html/gallery, to act like
- a httpserver, to export pictures to be mailed, ...)
- * work without database ! (just a xmlfile which can be rebuild
- from scratch)
- * handle a lot of photos (jbrout's author claims to have more than 20000
- of them)
- * upload photos to a flickr account
- * ...
+* manage albums/photos (= folders/files)
+* tag photos with IPTC keywords
+* use internal jpeg thumbnail
+* comment photos (with jpeg comment) and album (textfile in
+ folder)
+* rotate loss-less jpeg (and internal jpeg thumbnail)
+ use EXIF info (date, size ..)
+* search pictures (tags, comment, date, ...)
+* use plugins (to export to html/gallery, to act like
+ a httpserver, to export pictures to be mailed, ...)
+* work without database ! (just a xmlfile which can be rebuild
+ from scratch)
+* handle a lot of photos (jbrout's author claims to have more than 20000
+ of them)
+* upload photos to a flickr account
+* ...
%prep
%setup -q -n %{name}
-cd %{name}
-rm -rvf jbrout/plugins/multiexport/libs/picasaweb/{atom,gdata}/
-find . -type f -exec chmod -x '{}' \;
-find plugins/ -type f -exec sed -i -e '/^#!\/usr.*\/bin\/.*python/d' '{}' \;
-find . -name \*.py -exec grep -H '^.*usr/local' '{}' \; | while FILE ; do
- sed -i -e '/^#!\/usr.*\/bin\/.*python/d' $FILE
-done
-install -p %{SOURCE1} Makefile
+sh %{SOURCE5}
+install -p %{SOURCE1} jbrout/Makefile
install -p -m a+rx,u+w %{SOURCE4} jbrout/install-script
%build
cd %{name}
+ls
make PODIR=po
%install
@@ -94,10 +69,10 @@ install -D -m a+rx,u+w %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/%{name}
install -D -p -m a+rx,u+w %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
desktop-file-install \
- --dir $RPM_BUILD_ROOT%{_datadir}/applications \
- --add-category=X-Fedora \
- --delete-original \
- $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
+ --dir $RPM_BUILD_ROOT%{_datadir}/applications \
+ --add-category=X-Fedora \
+ --delete-original \
+ $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
%clean
rm -rf $RPM_BUILD_ROOT
@@ -157,7 +132,7 @@ rm -rf $RPM_BUILD_ROOT
* Thu Jan 01 2009 Matěj Cepl <mcepl at redhat.com> 0.3.131-0.1.f10only
- Testing build of the new upstream release (because of broken upgrade
- build).
+build).
* Thu Jun 26 2008 Matěj Cepl <mcepl at redhat.com> 0.2.201-2
- Fixing packaging bugs mentioned in the package review.
@@ -176,9 +151,9 @@ rm -rf $RPM_BUILD_ROOT
- Working on Fedora package review.
- We have svn export so no .svn directories, so no need to remove them
- Fix Makefile -- DESTDIR should be / per default and don't
- remove during the installation process
+remove during the installation process
- Fixed fixing of file permissions -- we did too much and in too
- many places; consolidated to %%prep stage.
+many places; consolidated to %%prep stage.
* Mon May 21 2007 Matej Cepl <mcepl at redhat.com> - 0.2.114.svn169-1
- New SVN checkout
More information about the scm-commits
mailing list