--- sunwait-20220613.orig/debian/changelog
+++ sunwait-20220613/debian/changelog
@@ -0,0 +1,17 @@
+sunwait (20220613-1) stable; urgency=medium
+
+  * version number update by debtransform
+
+ -- debtransform <build@opensuse.org>  Wed, 10 Jun 2026 05:37:01 +0000
+
+sunwait (20220613) stable; urgency=medium
+
+  * update to version 20220613
+
+ -- Jan Baier <jbaier@suse.com>  Mon, 06 Jan 2020 13:00:47 +0100
+
+sunwait (20190321) stable; urgency=low
+
+  * add new package sunwait version 20041208 
+
+ -- Jan Baier <jbaier@suse.com>  Thu, 15 Aug 2019 13:57:54 +0200
--- sunwait-20220613.orig/debian/compat
+++ sunwait-20220613/debian/compat
@@ -0,0 +1 @@
+12
--- sunwait-20220613.orig/debian/control
+++ sunwait-20220613/debian/control
@@ -0,0 +1,15 @@
+Source: sunwait
+Section: science
+Priority: optional
+Maintainer: Jan Baier <jbaier@suse.com>
+Build-Depends: debhelper (>= 12), build-essential
+
+Package: sunwait
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Sunrise, sunset and twilight calculator
+ Sunwait is a small C program for calculating sunrise and sunset, as well as
+ civil, nautical, and astronomical twilights. It has features that make it
+ useful for home automation tasks.
+ .
+ For more, see http://www.risacher.org/sunwait
--- sunwait-20220613.orig/debian/rules
+++ sunwait-20220613/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+	dh $@
--- sunwait-20220613.orig/makefile
+++ sunwait-20220613/makefile
@@ -7,7 +7,7 @@
 
 
 C=gcc
-CFLAGS=-c -Wall 
+CFLAGS=-c -Wall $(RPM_OPT_FLAGS)
 LDFLAGS= -lm -lstdc++
 SOURCES=sunwait.cpp sunriset.cpp print.cpp
 HEADERS=sunwait.h sunriset.h print.h
@@ -15,7 +15,7 @@
 EXECUTABLE=sunwait
 
 all: $(SOURCES) $(EXECUTABLE)
-	
+
 $(EXECUTABLE): $(OBJECTS)
 	$(C) $(OBJECTS) -o $@ $(LDFLAGS)
 
@@ -23,6 +23,6 @@
 	$(C) $(CFLAGS) $< -o $@
 
 clean:
-	rm -f *.o sunwait
+	$(RM) *.o sunwait
 
 
--- sunwait-20220613.orig/sunwait.cpp
+++ sunwait-20220613/sunwait.cpp
@@ -70,9 +70,9 @@
 }
 
 /*
-** It's very useful to have this here 
+** It's very useful to have this here
 */
-void print_usage () 
+void print_usage ()
 { printf ("Calculate sunrise and sunset times for the current or targetted day.\n");
   printf ("The times can be adjusted either for twilight or fixed durations.\n");
   printf ("\n");
@@ -150,7 +150,7 @@
 
 void myToLower (const int argc, char *argv[])
 { for (int i=1; i < argc; i++)
-    myToLower (argv [i]); 
+    myToLower (argv [i]);
 }
 
 boolean myIsNumber (const char *arg)
@@ -323,7 +323,7 @@
       else if (compass == 'W') { bearing = 360 - bearing; compass = 'E'; }
 
       /* It's almost done, assign bearing to appropriate global */
-           if (compass == 'N') pRun->latitude  = fixLatitude  (bearing); 
+           if (compass == 'N') pRun->latitude  = fixLatitude  (bearing);
       else if (compass == 'E') pRun->longitude = fixLongitude (bearing);
       else return false;
       return true;  /* All done */
@@ -467,7 +467,7 @@
 
     utcBiasHours = (localNoonTm.tm_hour - utcNoonTm.tm_hour)
                  + (localNoonTm.tm_min  - utcNoonTm.tm_min) / 60.0;
-    
+
     // The day may be different between the two times, especially if the local timezone is near the dateline.
     // Rollover of tm_yday (from 365 to 0) is a further problem, but no bias is ever more than 24 hours - that wouldn't make sense.
 
@@ -546,7 +546,7 @@
   tmpTm.tm_sec += myRound (pRun->utcBiasHours * 3600.0);
 
   // Let mktime() do it's magic
-  return mktime (&tmpTm);  
+  return mktime (&tmpTm);
 }
 
 /*
@@ -643,19 +643,19 @@
 
   /*
   **
-  ** Parse command line arguments 
+  ** Parse command line arguments
   **
   */
 
-  // Change to all lowercase, just to make life easier ... 
-  myToLower (argc, argv); 
+  // Change to all lowercase, just to make life easier ...
+  myToLower (argc, argv);
 
   // Look for debug being activated ...
   for (int i=1; i < argc; i++) if (!strcmp (argv [i], "debug")) pRun->debug = ONOFF_ON;
 
   // For each argument
   for (int i=1; i < argc; i++)
-  { 
+  {
     char *arg = argv[i];
 
     // Echo argument, if in debug
@@ -704,9 +704,9 @@
                !strcmp (arg, "noutc"))        pRun->utc = ONOFF_OFF;
 
     // Debug mode
-    else if   (!strcmp (arg, "debug"))        ||
-               !strcmp (arg, "--debug"))      ||
-               !strcmp (arg, "--verbose"))    ||
+    else if   (!strcmp (arg, "debug")         ||
+               !strcmp (arg, "--debug")       ||
+               !strcmp (arg, "--verbose")     ||
                !strcmp (arg, "-v"))           pRun->debug = ONOFF_ON;
     else if   (!strcmp (arg, "nodebug"))      pRun->debug = ONOFF_OFF;
 
@@ -752,7 +752,7 @@
     else if   (!strcmp (arg, "m") && i+1<argc && myIsNumber (argv[i+1]))  monInt = atoi (argv [++i]); // Note: "++i"
     else if   (!strcmp (arg, "d") && i+1<argc && myIsNumber (argv[i+1])) mdayInt = atoi (argv [++i]); // Note: "++i"
 
-    // Specify fixed duration offset 
+    // Specify fixed duration offset
     else if   (!strcmp (arg, "o")             ||
                !strcmp (arg, "off")           ||
                !strcmp (arg, "offset"))       { if (i+1<argc && isOffset (pRun, argv[i+1])) { ++i; } /* Functionality in "isOffset()" */
@@ -828,7 +828,7 @@
 
     if (yearInt != NOT_SET)
     { if (yearInt < 0 || yearInt > 99)
-      { printf ("Error: \"Year\" must be between 0 and 99: %u\n", yearInt); 
+      { printf ("Error: \"Year\" must be between 0 and 99: %u\n", yearInt);
         exit (EXIT_ERROR);
       }
       targetTm.tm_year = yearInt + 100;
@@ -837,13 +837,13 @@
 
     if (monInt != NOT_SET)
     { if (monInt < 1 || monInt > 12)
-      { printf ("Error: \"Month\" must be between 1 and 12: %u\n", monInt); 
+      { printf ("Error: \"Month\" must be between 1 and 12: %u\n", monInt);
         exit (EXIT_ERROR);
       }
       targetTm.tm_mon = monInt-1; // We need month 0 to 11, not 1 to 12
     }
     if (pRun->debug == ONOFF_ON) printf ("Debug: Target   mon set to: %u\n", targetTm.tm_mon);
-  
+
     if (mdayInt != NOT_SET)
     { if (mdayInt < 1 || mdayInt > 31)
       { printf ("Error: \"Day of month\" must be between 1 and 31: %u\n", mdayInt);
@@ -852,7 +852,7 @@
       targetTm.tm_mday = mdayInt;
     }
     if (pRun->debug == ONOFF_ON) printf ("Debug: Target  mday set to: %u\n", targetTm.tm_mday);
-  
+
     // Set target time to the start of the UTC day
     targetTm.tm_hour = 0;
     targetTm.tm_min  = 0;
@@ -864,7 +864,7 @@
     targetTm.tm_isdst = -1;  // -1 means: mktime() must work it out. 0=DST not in effect. 1=DST in effect. (Daylight Savings)
 
     // Convert target "struct tm" to time_t.  It'll be set to midnight local time, on the target day.
-    pRun->targetTimet = mktime (&targetTm);  
+    pRun->targetTimet = mktime (&targetTm);
 
     // Shave off (add) UTC offset, so that time_t is converted from midnight local-time to midnight UTC on the target day
     targetTm.tm_sec += myRound (pRun->utcBiasHours * 60.0 * 60.0);
@@ -892,12 +892,12 @@
   */
 
   if (pRun->latitude == NOT_SET)
-  { if (pRun->debug == ONOFF_ON) printf ("Debug: latitude not set. Default applied.\n"); 
+  { if (pRun->debug == ONOFF_ON) printf ("Debug: latitude not set. Default applied.\n");
     pRun->latitude  = DEFAULT_LATITUDE; /* The Buttercross, Bingham, England */
   }
 
-  if (pRun->longitude == NOT_SET) 
-  { if (pRun->debug == ONOFF_ON) printf ("Debug: longitude not set. Default applied.\n"); 
+  if (pRun->longitude == NOT_SET)
+  { if (pRun->debug == ONOFF_ON) printf ("Debug: longitude not set. Default applied.\n");
     pRun->longitude = DEFAULT_LONGITUDE; /* The Buttercross, Bingham, England */
   }
 
@@ -911,7 +911,7 @@
   }
 
   /*
-  ** Check: Twilight Angle 
+  ** Check: Twilight Angle
   */
 
   if (pRun->twilightAngle == NOT_SET)
@@ -945,7 +945,7 @@
   */
 
   // IF no function requested THEN default to "usage"
-  if 
+  if
   (  pRun->functionList    == ONOFF_OFF
   && pRun->functionPoll    == ONOFF_OFF
   && pRun->functionUsage   == ONOFF_OFF
@@ -967,38 +967,38 @@
   ** OK - we're all done figuring out what to do - let's do it
   */
 
-  if (pRun->functionVersion == ONOFF_ON) 
+  if (pRun->functionVersion == ONOFF_ON)
   { if (pRun->debug == ONOFF_ON) printf ("Debug: Function selected: Version\n");
-    print_version (); 
-    exitCode = EXIT_OK; 
+    print_version ();
+    exitCode = EXIT_OK;
   }
 
-  if (pRun->functionUsage == ONOFF_ON) 
+  if (pRun->functionUsage == ONOFF_ON)
   { if (pRun->debug == ONOFF_ON) printf ("Debug: Function selected: Usage\n");
-    print_usage (); 
-    exitCode = EXIT_OK; 
+    print_usage ();
+    exitCode = EXIT_OK;
   }
 
   if (pRun->functionReport == ONOFF_ON)
   { if (pRun->debug == ONOFF_ON) printf ("Debug: Function selected: Report\n");
     generate_report (pRun);
-    exitCode = EXIT_OK; 
+    exitCode = EXIT_OK;
   }
 
-  if (pRun->functionList == ONOFF_ON)  
+  if (pRun->functionList == ONOFF_ON)
   { if (pRun->debug == ONOFF_ON) printf ("Debug: Function selected: List\n");
-    print_list (pRun);  
-    exitCode = EXIT_OK; 
+    print_list (pRun);
+    exitCode = EXIT_OK;
   }
 
   if (pRun->functionWait == ONOFF_ON)
   { if (pRun->debug == ONOFF_ON) printf ("Debug: Function selected: Wait\n");
-    exitCode = wait (pRun); 
+    exitCode = wait (pRun);
   }
 
-  if (pRun->functionPoll == ONOFF_ON)  
+  if (pRun->functionPoll == ONOFF_ON)
   { if (pRun->debug == ONOFF_ON) printf ("Debug: Function selected: Poll\n");
-    exitCode = poll (pRun); 
+    exitCode = poll (pRun);
          if (exitCode == EXIT_DAY)   printf ("DAY\n");
     else if (exitCode == EXIT_NIGHT) printf ("NIGHT\n");
     else if (exitCode == EXIT_OK)    printf ("OK\n");
@@ -1027,7 +1027,7 @@
 {
   /*
   ** Calculate start/end of twilight for given twilight type/angle.
-  ** For latitudes near poles, the sun might not pass through specified twilight angle that day. 
+  ** For latitudes near poles, the sun might not pass through specified twilight angle that day.
   ** For big longitudes, it's quite likely the sun is up at midnight UTC: this means we have to calculate successive days.
   */
 
@@ -1062,7 +1062,7 @@
   long waitRiseTomorrow  = waitMidnightUTC + static_cast <long> ( 3600.0 * getOffsetRiseHourUTC (pRun, &tomorrow)  );
   long waitSetTomorrow   = waitMidnightUTC + static_cast <long> ( 3600.0 * getOffsetSetHourUTC  (pRun, &tomorrow)  );
 
-  // Determine next sunrise and sunset 
+  // Determine next sunrise and sunset
   // (we may be in DAY, so the next event is sunset - followed by sunrise)
 
   long waitRiseSeconds = 0;
@@ -1094,7 +1094,7 @@
   else if (waitSetToday     > 0) { double diurnalArc = diurnalArcWithOffset (pRun, &today);     exitPolar = diurnalArc <= 0.0 || diurnalArc >= 24.0; }
   else                           { double diurnalArc = diurnalArcWithOffset (pRun, &tomorrow);  exitPolar = diurnalArc <= 0.0 || diurnalArc >= 24.0; }
 
-  if (exitPolar) 
+  if (exitPolar)
   { if (pRun->debug == ONOFF_ON) printf ("Debug: Polar region or large offset: No sunrise today, there's nothing to wait for!\n");
     return EXIT_ERROR;
   }
@@ -1112,7 +1112,7 @@
   { waitSeconds = waitRiseSeconds < waitSetSeconds ? waitRiseSeconds : waitSetSeconds; }
 
   // Don't wait if event has passed (or next going to occur soon [6hrs])
-  if (waitSeconds <= 0) 
+  if (waitSeconds <= 0)
   { if (pRun->debug == ONOFF_ON) printf ("Debug: Event already passed today, can't wait for that!\n");
     return EXIT_ERROR;
   }
@@ -1126,7 +1126,7 @@
     waitSeconds = 10;
   }
   else if (pRun->functionPoll == ONOFF_ON) waitSeconds += 60; // Make more sure that a subsequent POLL works properly (wink ;-)
-  
+
   /*
   ** Sleep (wait) until the event is expected
   */
