~ubuntu-branches/ubuntu/quantal/xdaliclock/quantal

« back to all changes in this revision

Viewing changes to OSX/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Kartik Mistry
  • Date: 2010-04-20 08:42:20 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100420084220-j7ykvh34b2jx7hyv
Tags: 2.31-1
* New maintainer (Closes: #561233)
* New upstream release (Closes: #578379)
* debian/control:
  + Updated to Standards-Version 3.8.4
  + Added ${misc:Depends} to Depends
  + Updated debhelper dependency to 7
* debian/rules:
  + Do not do append to copyright file trick
  + Used dh_prep instead of dh_clean -k
* Converted package to new source format 3.0 (quilt)
* debian/copyright:
  + Added missing vroot.h copyright
  + Better copyright assignment, year for Author
* debian/patches/spelling-error-in-manpage_xdaliclock:
  + Added patch to fix manpage spelling mistake by Florian Ernst
    <florian@debian.org>

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
        -rm -rf autom4te*.cache
16
16
        -rm -rf build
17
17
 
 
18
distdepend:: update_plist_version
 
19
distdepend:: update_bindist_version
 
20
 
18
21
debug: distdepend
19
22
        xcodebuild -target $(XCODE_TARGET) -configuration Debug   build
20
23
 
21
24
release:: distdepend
22
25
        xcodebuild -target $(XCODE_TARGET) -configuration Release build
23
26
 
 
27
release:: check_versions
 
28
 
24
29
release:: sign
25
30
 
26
31
sign:
27
 
        codesign -vfs 'Jamie Zawinski' build/Release/*.{app,saver}
 
32
        codesign -vfs 'Jamie Zawinski' build/Release/*.app
 
33
        codesign -vfs 'Jamie Zawinski' build/Release/*.saver
28
34
        codesign -vfs 'Jamie Zawinski' build/Release/*.wdgt/*.widgetplugin
29
35
#       codesign -vfs 'Jamie Zawinski' build/Release/*.wdgt
30
36
 
 
37
check_versions:
 
38
        @\
 
39
  U=../version.h ;                                                      \
 
40
  V=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ;]*\).*/\1/p' < $$U` ;          \
 
41
  DIR=build/Release ;                                                   \
 
42
  RESULT=0 ;                                                            \
 
43
  for P in `find $$DIR -name Info.plist` ; do                           \
 
44
     V2=`perl -0000 -n -e                                               \
 
45
        'm@<key>CFBundleVersion</key>\s*<string>(.*?)</string>@si       \
 
46
         && print $$1' < $$P` ;                                         \
 
47
     if [ "$$V2" != "$$V" ] ; then                                      \
 
48
       echo "Wrong version: $$P ($$V2)" ;                               \
 
49
       RESULT=1 ;                                                       \
 
50
     fi ;                                                               \
 
51
  done ;                                                                \
 
52
  if [ "$$RESULT" = 0 ]; then echo "Versions match ($$V2)" ; fi ;       \
 
53
  exit $$RESULT
 
54
 
 
55
 
31
56
echo_tarfiles:
32
57
        @echo `find . \
33
58
          \( \( -name '.??*' -o -name build -o -name CVS -o -name '*~*' \
34
 
             -o -name 'jwz.*' -o -name '*.widgetplugin' \) \
 
59
             -o -name 'jwz.*' -o -name '*.widgetplugin' \
 
60
             -o -name 'iphone-snap' \) \
35
61
             -prune \) \
36
62
          -o -type f -print \
37
63
        | sed 's@^\./@@' \
38
64
        | sort`
39
65
 
40
 
distdepend:: update_bindist_version
 
66
update_plist_version:
 
67
        @                                                                     \
 
68
  SS="AppInfo.plist SaverInfo.plist PluginInfo.plist iPhoneInfo.plist *.wdgt/Info.plist" ;   \
 
69
  SRC=../version.h ;                                                          \
 
70
  V=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' $$SRC` ;                 \
 
71
  Y=`date +%Y` ;                                                              \
 
72
  T=/tmp/xs.$$$$ ;                                                            \
 
73
  for S in $$SS ; do                                                          \
 
74
    /bin/echo -n "Updating version number in $$S to \"$$V\"... " ;            \
 
75
    KEYS1="CFBundleVersion|CFBundleShortVersionString" ;                      \
 
76
    KEYS2="NSHumanReadableCopyright|CFBundleLongVersionString|CFBundleGetInfoString" ; \
 
77
    perl -0777 -pne                                                           \
 
78
      "s@(<key>($$KEYS1)</key>\s*<string>)[^<>]+(</string>)@\$${1}$$V\$${3}@g; \
 
79
       s@(<key>($$KEYS2)</key>\s*<string>[^\d]+)[\d.]+(.*?</string>)@\$${1}$$V\$${3}@gs; \
 
80
       s@(<key>($$KEYS2)</key>\s*<string>.*?1991-)\d\d\d\d(.*?</string>)@\$${1}$$Y\$${3}@gs" \
 
81
    < $$S > $$T ;                                                           \
 
82
   if cmp -s $$S $$T ; then                                                 \
 
83
     echo "unchanged." ;                                                    \
 
84
   else                                                                     \
 
85
    cat $$T > $$S ;                                                         \
 
86
    echo "done." ;                                                          \
 
87
   fi ;                                                                     \
 
88
   rm $$T ;                                                                 \
 
89
  done
 
90
 
 
91
 
41
92
update_bindist_version:
42
93
        @                                                                   \
43
94
  SS="bindist.rtf" ;                                                        \
58
109
  done ;                                                                    \
59
110
  rm $$T
60
111
 
61
 
distdepend:: update_plist_version
62
 
update_plist_version:
63
 
        @\
64
 
  SS="AppInfo.plist SaverInfo.plist PluginInfo.plist *.wdgt/Info.plist" ;   \
65
 
  SRC=../version.h ;                                                        \
66
 
  V=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ;]*\).*/\1/p' $$SRC` ;              \
67
 
  for S in $$SS ; do                                                        \
68
 
   /bin/echo -n "Updating version number in $$S to \"$$V\"... " ;           \
69
 
   T=/tmp/xs.$$$$ ;                                                         \
70
 
   KEYS1="CFBundleVersion|CFBundleShortVersionString" ;                     \
71
 
   KEYS2="NSHumanReadableCopyright|CFBundleLongVersionString|CFBundleGetInfoString" ; \
72
 
   perl -0777 -pne                                                          \
73
 
 "s@(<key>($$KEYS1)</key>\s*<string>)[\d.]+(</string>)@\$${1}$$V\$${3}@gs;  \
74
 
  s@(<key>($$KEYS2)</key>\s*<string>[^\d]+)[\d.]+(.*?</string>)@\$${1}$$V\$${3}@gs" \
75
 
    < $$S > $$T ;                                                           \
76
 
   if cmp -s $$S $$T ; then                                                 \
77
 
     echo "unchanged." ;                                                    \
78
 
   else                                                                     \
79
 
    cat $$T > $$S ;                                                         \
80
 
    echo "done." ;                                                          \
81
 
   fi ;                                                                     \
82
 
   rm $$T ;                                                                 \
83
 
  done
84
 
 
85
 
 
86
112
# -format UDBZ saves 4% over UDZO, but that's only 8KB.
87
 
dmg:: distdepend
 
113
dmg:: distdepend check_versions
88
114
        @                                                                     \
89
115
  set -e ;                                                                    \
90
116
  SRC=../version.h ;                                                          \
102
128
  rm -rf "$$STAGE" ;                                                          \
103
129
  echo + mkdir "$$STAGE" ;                                                    \
104
130
         mkdir "$$STAGE" ;                                                    \
105
 
  FILES="$$SRC/*.app $$SRC/*.saver $$SRC/*.wdgt ../palm/daliclock.prc" ;      \
 
131
  FILES="$$SRC/*.app $$SRC/*.saver $$SRC/*.wdgt" ;                            \
106
132
  echo + cp -pr $$FILES "$$STAGE" ;                                           \
107
133
         cp -pr $$FILES "$$STAGE" ;                                           \
108
134
  set -x ;                                                                    \
110
136
  cp -p bindist-DS_Store "$$STAGE/.DS_Store" ;                                \
111
137
  /Developer/Tools/SetFile -a E "$$STAGE/ READ ME.rtf" ;                      \
112
138
  /Developer/Tools/SetFile -a e $$STAGE/*.saver ;                             \
113
 
  /Developer/Tools/SetFile -a e $$STAGE/*.prc ;                               \
114
139
  /Developer/Tools/SetFile -a e $$STAGE/*.wdgt ;                              \
115
 
  seticon -d daliclockPRC.icns $$STAGE/*.prc ;                                \
116
140
  seticon -d daliclockSaver.icns $$STAGE/*.saver ;                            \
117
141
  seticon -d daliclockWidget.icns $$STAGE/*.wdgt ;                            \
118
142
  hdiutil makehybrid -quiet -ov -hfs -hfs-volume-name "$$VOLNAME"             \