Subversion Repositories HomeAutomation

Rev

Rev 2227 | Rev 2302 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 2227 Rev 2293
Line 47... Line 47...
47
    BDEPS="debhelper (>= 7.0.50~), cmake, libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libv8-dev (>= 2.2.18), libboost-date-time1.48-dev, libboost-filesystem1.48-dev, libboost-program-options1.48-dev, libboost-signals1.48-dev, libboost-thread1.48-dev, libreadline-dev, libx11-dev (>= 2:1.3), libmysqlclient-dev"
47
    BDEPS="debhelper (>= 7.0.50~), cmake, libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libv8-dev (>= 2.2.18), libboost-date-time1.48-dev, libboost-filesystem1.48-dev, libboost-program-options1.48-dev, libboost-signals1.48-dev, libboost-thread1.48-dev, libreadline-dev, libx11-dev (>= 2:1.3), libmysqlclient-dev"
48
    ;;
48
    ;;
49
  quantal)
49
  quantal)
50
    DEPS="libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libboost-thread1.49.0, libboost-system1.49.0, libboost-signals1.49.0, libboost-filesystem1.49.0, libboost-date-time1.49.0, libboost-program-options1.49.0, libv8-3.8.9.20, libmysqlclient18"
50
    DEPS="libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libboost-thread1.49.0, libboost-system1.49.0, libboost-signals1.49.0, libboost-filesystem1.49.0, libboost-date-time1.49.0, libboost-program-options1.49.0, libv8-3.8.9.20, libmysqlclient18"
51
    BDEPS="debhelper (>= 7.0.50~), cmake, libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libv8-dev (>= 2.2.18), libboost-date-time1.49-dev, libboost-filesystem1.49-dev, libboost-program-options1.49-dev, libboost-signals1.49-dev, libboost-thread1.49-dev, libreadline-dev, libx11-dev (>= 2:1.3), libmysqlclient-dev"
51
    BDEPS="debhelper (>= 7.0.50~), cmake, libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libv8-dev (>= 2.2.18), libboost-date-time1.49-dev, libboost-filesystem1.49-dev, libboost-program-options1.49-dev, libboost-signals1.49-dev, libboost-thread1.49-dev, libreadline-dev, libx11-dev (>= 2:1.3), libmysqlclient-dev"
-
 
52
    ;;
-
 
53
  raring)
-
 
54
    DEPS="libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libboost-thread1.53.0, libboost-system1.53.0, libboost-signals1.53.0, libboost-filesystem1.53.0, libboost-date-time1.53.0, libboost-program-options1.53.0, libv8-3.8.9.20, libmysqlclient18"
-
 
55
    BDEPS="debhelper (>= 7.0.50~), cmake, libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libv8-dev (>= 2.2.18), libboost-date-time1.53-dev, libboost-filesystem1.53-dev, libboost-program-options1.53-dev, libboost-signals1.53-dev, libboost-thread1.53-dev, libreadline-dev, libx11-dev (>= 2:1.3), libmysqlclient-dev"
-
 
56
    ;;
-
 
57
  saucy)
-
 
58
    DEPS="libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libboost-thread1.54.0, libboost-system1.54.0, libboost-signals1.54.0, libboost-filesystem1.54.0, libboost-date-time1.54.0, libboost-program-options1.54.0, libv8-3.14.5, libmysqlclient18"
-
 
59
    BDEPS="debhelper (>= 7.0.50~), cmake, libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libv8-dev (>= 2.2.18), libboost-date-time1.54-dev, libboost-filesystem1.54-dev, libboost-program-options1.54-dev, libboost-signals1.54-dev, libboost-thread1.54-dev, libreadline-dev, libx11-dev (>= 2:1.3), libmysqlclient-dev"
-
 
60
    ;;
-
 
61
  trusty)
-
 
62
    DEPS="libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libboost-thread1.54.0, libboost-system1.54.0, libboost-signals1.54.0, libboost-filesystem1.54.0, libboost-date-time1.54.0, libboost-program-options1.54.0, libv8-3.14.5, libmysqlclient18"
-
 
63
    BDEPS="debhelper (>= 7.0.50~), cmake, libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libv8-dev (>= 2.2.18), libboost-date-time1.54-dev, libboost-filesystem1.54-dev, libboost-program-options1.54-dev, libboost-signals1.54-dev, libboost-thread1.54-dev, libreadline-dev, libx11-dev (>= 2:1.3), libmysqlclient-dev"
52
    ;;
64
    ;;
53
esac
65
esac
54
 
66
 
55
# Run script from cron every hour
67
# Run script from cron every hour
56
# script will check revision of Atom in SVN and if there is a new version the script will
68
# script will check revision of Atom in SVN and if there is a new version the script will
Line 62... Line 74...
62
 
74
 
63
# Run next line to force, even if no new svn revision
75
# Run next line to force, even if no new svn revision
64
#rm $REVFILE
76
#rm $REVFILE
65
 
77
 
66
# Check if script is already running
78
# Check if script is already running
67
if [ -e $TMPFILE ]; then
79
if [ -e $TMPFILE ]
-
 
80
then
68
  echo "Error: Already running?"
81
  echo "Error: Already running?"
69
  exit 1
82
  exit 1
70
fi
83
fi
71
 
84
 
72
# Check that revision variable is set
85
# Check that revision variable is set
Line 98... Line 111...
98
# Now running script
111
# Now running script
99
touch $TMPFILE
112
touch $TMPFILE
100
 
113
 
101
mkdir $ATOMDIR
114
mkdir $ATOMDIR
102
 
115
 
-
 
116
echo "******** Exporting SVN ********"
103
# Export atom to get rid of .svn subfolders
117
# Export atom to get rid of .svn subfolders
104
svn export $SVNURL $ATOMDIR/$NOSVNDIR
118
svn export $SVNURL $ATOMDIR/$NOSVNDIR
105
# Export configuration folder into the exported Atom-folder
119
# Export configuration folder into the exported Atom-folder
106
svn export $SVNURLCNF $ATOMDIR/$NOSVNDIR/$CNFDIR
120
svn export $SVNURLCNF $ATOMDIR/$NOSVNDIR/$CNFDIR
107
 
121
 
-
 
122
echo "******** Creating debian dir ********"
108
mkdir -p $ATOMDIR/$NOSVNDIR/debian
123
mkdir -p $ATOMDIR/$NOSVNDIR/debian
109
 
124
 
-
 
125
echo "******** Adding SVN revision file ********"
110
# Add a svn revision file, atom need the svn revision when building
126
# Add a svn revision file, atom need the svn revision when building
111
echo -n $CURRREV > $ATOMDIR/$NOSVNDIR/AtomSvnRev
127
echo -n $CURRREV > $ATOMDIR/$NOSVNDIR/AtomSvnRev
112
 
128
 
113
# Change install-target for data.xml file in CMakeList.txt, not needed, done in CMakeList.txt
129
# Change install-target for data.xml file in CMakeList.txt, not needed, done in CMakeList.txt
114
#cat $ATOMDIR/$NOSVNDIR/CMakeLists.txt | sed -e 's/\/..\/..\/Configuration\/data.xml/\/Configuration\/data.xml/' > $ATOMDIR/$NOSVNDIR/CMakeLists.txt
130
#cat $ATOMDIR/$NOSVNDIR/CMakeLists.txt | sed -e 's/\/..\/..\/Configuration\/data.xml/\/Configuration\/data.xml/' > $ATOMDIR/$NOSVNDIR/CMakeLists.txt
115
 
131
 
116
 
-
 
-
 
132
echo "******** Copying debian files ********"
117
cp $RUNDIR/files/atom.conf $ATOMDIR/$NOSVNDIR/debian/
133
cp $RUNDIR/files/atom.conf $ATOMDIR/$NOSVNDIR/debian/
118
cp $RUNDIR/files/compat $ATOMDIR/$NOSVNDIR/debian/
134
cp $RUNDIR/files/compat $ATOMDIR/$NOSVNDIR/debian/
119
cp $RUNDIR/files/copyright $ATOMDIR/$NOSVNDIR/debian/
135
cp $RUNDIR/files/copyright $ATOMDIR/$NOSVNDIR/debian/
120
cp $RUNDIR/files/rules $ATOMDIR/$NOSVNDIR/debian/
136
cp $RUNDIR/files/rules $ATOMDIR/$NOSVNDIR/debian/
121
cp $RUNDIR/files/control $ATOMDIR/$NOSVNDIR/debian/
137
cp $RUNDIR/files/control $ATOMDIR/$NOSVNDIR/debian/
122
 
138
 
-
 
139
echo "******** Set the correct depends and build depends ********"
123
# Set the correct depends and build depends, different for different distributions
140
# Set the correct depends and build depends, different for different distributions
124
sed -i "s/^Build-Depends/Build-Depends: ${BDEPS}/g" $ATOMDIR/$NOSVNDIR/debian/control
141
sed -i "s/^Build-Depends/Build-Depends: ${BDEPS}/g" $ATOMDIR/$NOSVNDIR/debian/control
125
sed -i "s/^Depends/Depends: ${DEPS}/g" $ATOMDIR/$NOSVNDIR/debian/control
142
sed -i "s/^Depends/Depends: ${DEPS}/g" $ATOMDIR/$NOSVNDIR/debian/control
126
 
143
 
-
 
144
echo "******** Create debian changelog from SVN log ********"
127
# Create the debian changelog file from svn log
145
# Create the debian changelog file from svn log
128
echo "$PKGNAME ($VERSION) $DIST; urgency=low" > $ATOMDIR/$NOSVNDIR/debian/changelog
146
echo "$PKGNAME ($VERSION) $DIST; urgency=low" > $ATOMDIR/$NOSVNDIR/debian/changelog
129
echo "" >> $ATOMDIR/$NOSVNDIR/debian/changelog
147
echo "" >> $ATOMDIR/$NOSVNDIR/debian/changelog
130
OLDIFS="$IFS"
148
OLDIFS="$IFS"
131
IFS=$'\n'
149
IFS=$'\n'
Line 143... Line 161...
143
done
161
done
144
IFS="$OLDIFS"
162
IFS="$OLDIFS"
145
echo "" >> $ATOMDIR/$NOSVNDIR/debian/changelog
163
echo "" >> $ATOMDIR/$NOSVNDIR/debian/changelog
146
echo " -- $PKGMAINT  $CHLOGDATE" >> $ATOMDIR/$NOSVNDIR/debian/changelog
164
echo " -- $PKGMAINT  $CHLOGDATE" >> $ATOMDIR/$NOSVNDIR/debian/changelog
147
 
165
 
148
 
-
 
-
 
166
echo "******** Create orig tar.gz ********"
149
# Create orig tar gz
167
# Create orig tar gz
150
cd $ATOMDIR
168
cd $ATOMDIR
151
tar -zcf $ORIGTAR $NOSVNDIR
169
tar -zcf $ORIGTAR $NOSVNDIR
152
 
170
 
-
 
171
echo "******** Create source package with debuild ********"
153
# Create source package with debuild
172
# Create source package with debuild
154
cd $ATOMDIR/$NOSVNDIR
173
cd $ATOMDIR/$NOSVNDIR
155
debuild $DEBUILDFLG
174
debuild $DEBUILDFLG
156
 
175
 
-
 
176
echo "******** Upload to launchpad with dput ********"
157
# Upload to launchpad with dput
177
# Upload to launchpad with dput
158
cd $ATOMDIR
178
cd $ATOMDIR
159
dput $DPUTFLG
179
dput $DPUTFLG
160
# Requires ubuntu 9.10 or newer
180
# Requires ubuntu 9.10 or newer
161
#dput $PPA $SRCCHFILE
181
#dput $PPA $SRCCHFILE
162
 
182
 
163
# Remove all temporary files
183
# Remove all temporary files
164
#rm -rf $ATOMDIR
184
#rm -rf $ATOMDIR
165
 
185
 
-
 
186
echo "******** Write current SVN rev to file ********"
166
# Write the current svn revision to file
187
# Write the current svn revision to file
167
echo -n $CURRREV > $REVFILE
188
echo -n $CURRREV > $REVFILE
168
 
189
 
169
cd $RUNDIR
190
cd $RUNDIR
170
 
191